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().

  • Method Details

    • getAttributes

      public EntityPayloadAttributes getAttributes()
      Specified by:
      getAttributes in interface EntityPayloadIF
      Returns:
      The value of the attributes attribute
    • getFields

      public Optional<EntityPayloadFields> getFields()
      Specified by:
      getFields in interface EntityPayloadIF
      Returns:
      The value of the fields attribute
    • getCustomFields

      public List<EntityPayloadAttributesCustomField> getCustomFields()
      Specified by:
      getCustomFields in interface EntityPayloadIF
      Returns:
      The value of the customFields attribute
    • getDisplayOrder

      public List<String> getDisplayOrder()
      Specified by:
      getDisplayOrder in interface EntityPayloadIF
      Returns:
      The value of the displayOrder attribute
    • getActions

      public Optional<WorkObjectActionBlock> getActions()
      Specified by:
      getActions in interface EntityPayloadIF
      Returns:
      The value of the actions attribute
    • withAttributes

      public final EntityPayload withAttributes(EntityPayloadAttributes value)
      Copy the current immutable object by setting a value for the attributes attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for attributes
      Returns:
      A modified copy or the this object
    • withFields

      public final EntityPayload withFields(@Nullable EntityPayloadFields value)
      Copy the current immutable object by setting a present value for the optional fields attribute.
      Parameters:
      value - The value for fields, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withFields

      public final EntityPayload withFields(Optional<? extends EntityPayloadFields> optional)
      Copy the current immutable object by setting an optional value for the fields attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for fields
      Returns:
      A modified copy or this if not changed
    • withCustomFields

      public final EntityPayload withCustomFields(EntityPayloadAttributesCustomField... elements)
      Copy the current immutable object with elements that replace the content of customFields.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCustomFields

      public final EntityPayload withCustomFields(Iterable<? extends EntityPayloadAttributesCustomField> elements)
      Copy the current immutable object with elements that replace the content of customFields. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of customFields elements to set
      Returns:
      A modified copy or this if not changed
    • withDisplayOrder

      public final EntityPayload withDisplayOrder(String... elements)
      Copy the current immutable object with elements that replace the content of displayOrder.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withDisplayOrder

      public final EntityPayload withDisplayOrder(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of displayOrder. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of displayOrder elements to set
      Returns:
      A modified copy or this if not changed
    • withActions

      public final EntityPayload withActions(@Nullable WorkObjectActionBlock value)
      Copy the current immutable object by setting a present value for the optional actions attribute.
      Parameters:
      value - The value for actions, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withActions

      public final EntityPayload withActions(Optional<? extends WorkObjectActionBlock> optional)
      Copy the current immutable object by setting an optional value for the actions attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for actions
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of EntityPayload that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: attributes, fields, customFields, displayOrder, actions.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value EntityPayload with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static EntityPayload copyOf(EntityPayloadIF instance)
      Creates an immutable copy of a EntityPayloadIF value. 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

      public static EntityPayload.Builder builder()
      Creates a builder for EntityPayload.
       EntityPayload.builder()
          .setAttributes(com.hubspot.slack.client.methods.params.chat.workobject.entity.EntityPayloadAttributes) // required attributes
          .setFields(Optional<com.hubspot.slack.client.methods.params.chat.workobject.entity.fields.EntityPayloadFields>) // optional fields
          .addCustomFields|addAllCustomFields(EntityPayloadAttributesCustomField) // customFields elements
          .addDisplayOrder|addAllDisplayOrder(String) // displayOrder elements
          .setActions(Optional<com.hubspot.slack.client.methods.params.chat.workobject.actions.WorkObjectActionBlock>) // optional actions
          .build();
       
      Returns:
      A new EntityPayload builder