Class EntityPayload
java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.entity.EntityPayload
- All Implemented Interfaces:
EntityPayloadIF
@Generated(from="EntityPayloadIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class EntityPayload
extends Object
implements EntityPayloadIF
Immutable implementation of
EntityPayloadIF.
Use the builder to create immutable instances:
EntityPayload.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic EntityPayload.Builderbuilder()Creates a builder forEntityPayload.static EntityPayloadcopyOf(EntityPayloadIF instance) Creates an immutable copy of aEntityPayloadIFvalue.booleanThis instance is equal to all instances ofEntityPayloadthat have equal attribute values.inthashCode()Computes a hash code from attributes:attributes,fields,customFields,displayOrder,actions.toString()Prints the immutable valueEntityPayloadwith attribute values.final EntityPayloadwithActions(WorkObjectActionBlock value) Copy the current immutable object by setting a present value for the optionalactionsattribute.final EntityPayloadwithActions(Optional<? extends WorkObjectActionBlock> optional) Copy the current immutable object by setting an optional value for theactionsattribute.final EntityPayloadCopy the current immutable object by setting a value for theattributesattribute.final EntityPayloadwithCustomFields(EntityPayloadAttributesCustomField... elements) Copy the current immutable object with elements that replace the content ofcustomFields.final EntityPayloadwithCustomFields(Iterable<? extends EntityPayloadAttributesCustomField> elements) Copy the current immutable object with elements that replace the content ofcustomFields.final EntityPayloadwithDisplayOrder(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofdisplayOrder.final EntityPayloadwithDisplayOrder(String... elements) Copy the current immutable object with elements that replace the content ofdisplayOrder.final EntityPayloadwithFields(EntityPayloadFields value) Copy the current immutable object by setting a present value for the optionalfieldsattribute.final EntityPayloadwithFields(Optional<? extends EntityPayloadFields> optional) Copy the current immutable object by setting an optional value for thefieldsattribute.
-
Method Details
-
getAttributes
- Specified by:
getAttributesin interfaceEntityPayloadIF- Returns:
- The value of the
attributesattribute
-
getFields
- Specified by:
getFieldsin interfaceEntityPayloadIF- Returns:
- The value of the
fieldsattribute
-
getCustomFields
- Specified by:
getCustomFieldsin interfaceEntityPayloadIF- Returns:
- The value of the
customFieldsattribute
-
getDisplayOrder
- Specified by:
getDisplayOrderin interfaceEntityPayloadIF- Returns:
- The value of the
displayOrderattribute
-
getActions
- Specified by:
getActionsin interfaceEntityPayloadIF- Returns:
- The value of the
actionsattribute
-
withAttributes
Copy the current immutable object by setting a value for theattributesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for attributes- Returns:
- A modified copy or the
thisobject
-
withFields
Copy the current immutable object by setting a present value for the optionalfieldsattribute.- Parameters:
value- The value for fields,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withFields
Copy the current immutable object by setting an optional value for thefieldsattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for fields- Returns:
- A modified copy or
thisif not changed
-
withCustomFields
Copy the current immutable object with elements that replace the content ofcustomFields.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCustomFields
public final EntityPayload withCustomFields(Iterable<? extends EntityPayloadAttributesCustomField> elements) Copy the current immutable object with elements that replace the content ofcustomFields. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of customFields elements to set- Returns:
- A modified copy or
thisif not changed
-
withDisplayOrder
Copy the current immutable object with elements that replace the content ofdisplayOrder.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDisplayOrder
Copy the current immutable object with elements that replace the content ofdisplayOrder. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of displayOrder elements to set- Returns:
- A modified copy or
thisif not changed
-
withActions
Copy the current immutable object by setting a present value for the optionalactionsattribute.- Parameters:
value- The value for actions,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withActions
Copy the current immutable object by setting an optional value for theactionsattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for actions- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofEntityPayloadthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:attributes,fields,customFields,displayOrder,actions. -
toString
Prints the immutable valueEntityPayloadwith attribute values. -
copyOf
Creates an immutable copy of aEntityPayloadIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable EntityPayload instance
-
builder
Creates a builder forEntityPayload.EntityPayload.builder() .setAttributes(com.hubspot.slack.client.methods.params.chat.workobject.entity.EntityPayloadAttributes) // requiredattributes.setFields(Optional<com.hubspot.slack.client.methods.params.chat.workobject.entity.fields.EntityPayloadFields>) // optionalfields.addCustomFields|addAllCustomFields(EntityPayloadAttributesCustomField) //customFieldselements .addDisplayOrder|addAllDisplayOrder(String) //displayOrderelements .setActions(Optional<com.hubspot.slack.client.methods.params.chat.workobject.actions.WorkObjectActionBlock>) // optionalactions.build();- Returns:
- A new EntityPayload builder
-