Class HomeTabViewPayload

java.lang.Object
com.hubspot.slack.client.models.views.HomeTabViewPayload
All Implemented Interfaces:
HomeTabViewPayloadBase, HomeTabViewPayloadIF, ViewPayloadBase, ViewPayloadJsonBase

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

Use the builder to create immutable instances: HomeTabViewPayload.builder(). Use the static factory method to create immutable instances: HomeTabViewPayload.of().

  • Method Details

    • getPrivateMetadata

      public Optional<String> getPrivateMetadata()
      Specified by:
      getPrivateMetadata in interface ViewPayloadBase
      Returns:
      The value of the privateMetadata attribute
    • getCallbackId

      public Optional<String> getCallbackId()
      Specified by:
      getCallbackId in interface ViewPayloadBase
      Returns:
      The value of the callbackId attribute
    • getExternalId

      public Optional<String> getExternalId()
      Specified by:
      getExternalId in interface ViewPayloadBase
      Returns:
      The value of the externalId attribute
    • getType

      public String getType()
      Specified by:
      getType in interface HomeTabViewPayloadBase
      Specified by:
      getType in interface ViewPayloadBase
      Returns:
      The computed-at-construction value of the type attribute
    • getBlocks

      public List<Block> getBlocks()
      Specified by:
      getBlocks in interface HomeTabViewPayloadIF
      Specified by:
      getBlocks in interface ViewPayloadBase
      Returns:
      The value of the blocks attribute
    • withPrivateMetadata

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

      public final HomeTabViewPayload withPrivateMetadata(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the privateMetadata attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for privateMetadata
      Returns:
      A modified copy or this if not changed
    • withCallbackId

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

      public final HomeTabViewPayload withCallbackId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the callbackId attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for callbackId
      Returns:
      A modified copy or this if not changed
    • withExternalId

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

      public final HomeTabViewPayload withExternalId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the externalId attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for externalId
      Returns:
      A modified copy or this if not changed
    • withBlocks

      public final HomeTabViewPayload withBlocks(Block... elements)
      Copy the current immutable object with elements that replace the content of blocks.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withBlocks

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of HomeTabViewPayload 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: privateMetadata, callbackId, externalId, type, blocks.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static HomeTabViewPayload of(List<Block> blocks)
      Construct a new immutable HomeTabViewPayload instance.
      Parameters:
      blocks - The value for the blocks attribute
      Returns:
      An immutable HomeTabViewPayload instance
    • of

      public static HomeTabViewPayload of(Iterable<? extends Block> blocks)
      Construct a new immutable HomeTabViewPayload instance.
      Parameters:
      blocks - The value for the blocks attribute
      Returns:
      An immutable HomeTabViewPayload instance
    • copyOf

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

      public static HomeTabViewPayload.Builder builder()
      Creates a builder for HomeTabViewPayload.
       HomeTabViewPayload.builder()
          .setPrivateMetadata(Optional<String>) // optional privateMetadata
          .setCallbackId(Optional<String>) // optional callbackId
          .setExternalId(Optional<String>) // optional externalId
          .addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) // blocks elements
          .build();
       
      Returns:
      A new HomeTabViewPayload builder