java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.WorkObject
All Implemented Interfaces:
WorkObjectBase, WorkObjectIF

@Generated(from="WorkObjectIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class WorkObject extends Object implements WorkObjectIF
Immutable implementation of WorkObjectIF.

Use the builder to create immutable instances: WorkObject.builder().

  • Method Details

    • getEntityType

      public EntityType getEntityType()
      Specified by:
      getEntityType in interface WorkObjectBase
      Returns:
      The value of the entityType attribute
    • getEntityPayload

      public EntityPayload getEntityPayload()
      Specified by:
      getEntityPayload in interface WorkObjectBase
      Returns:
      The value of the entityPayload attribute
    • getUrl

      public String getUrl()
      Specified by:
      getUrl in interface WorkObjectBase
      Returns:
      The value of the url attribute
    • getExternalRef

      public ExternalRef getExternalRef()
      Specified by:
      getExternalRef in interface WorkObjectBase
      Returns:
      The value of the externalRef attribute
    • getAppUnfurlUrl

      public String getAppUnfurlUrl()
      Specified by:
      getAppUnfurlUrl in interface WorkObjectIF
      Returns:
      The value of the appUnfurlUrl attribute
    • withEntityType

      public final WorkObject withEntityType(EntityType value)
      Copy the current immutable object by setting a value for the entityType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for entityType
      Returns:
      A modified copy or the this object
    • withEntityPayload

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

      public final WorkObject withUrl(String value)
      Copy the current immutable object by setting a value for the url attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for url
      Returns:
      A modified copy or the this object
    • withExternalRef

      public final WorkObject withExternalRef(ExternalRef value)
      Copy the current immutable object by setting a value for the externalRef attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for externalRef
      Returns:
      A modified copy or the this object
    • withAppUnfurlUrl

      public final WorkObject withAppUnfurlUrl(String value)
      Copy the current immutable object by setting a value for the appUnfurlUrl attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for appUnfurlUrl
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of WorkObject 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: entityType, entityPayload, url, externalRef, appUnfurlUrl.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static WorkObject copyOf(WorkObjectIF instance)
      Creates an immutable copy of a WorkObjectIF 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 WorkObject instance
    • builder

      public static WorkObject.Builder builder()
      Creates a builder for WorkObject.
       WorkObject.builder()
          .setEntityType(com.hubspot.slack.client.methods.params.chat.workobject.EntityType) // required entityType
          .setEntityPayload(com.hubspot.slack.client.methods.params.chat.workobject.entity.EntityPayload) // required entityPayload
          .setUrl(String) // required url
          .setExternalRef(com.hubspot.slack.client.methods.params.chat.workobject.ExternalRef) // required externalRef
          .setAppUnfurlUrl(String) // required appUnfurlUrl
          .build();
       
      Returns:
      A new WorkObject builder