Class PublishViewParams

java.lang.Object
com.hubspot.slack.client.methods.params.views.PublishViewParams
All Implemented Interfaces:
PublishViewParamsIF

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

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

  • Method Details

    • getUserId

      public String getUserId()
      Specified by:
      getUserId in interface PublishViewParamsIF
      Returns:
      The value of the userId attribute
    • getView

      public HomeTabViewPayload getView()
      Specified by:
      getView in interface PublishViewParamsIF
      Returns:
      The value of the view attribute
    • getHash

      public Optional<String> getHash()
      Specified by:
      getHash in interface PublishViewParamsIF
      Returns:
      The value of the hash attribute
    • withUserId

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

      public final PublishViewParams withView(HomeTabViewPayload value)
      Copy the current immutable object by setting a value for the view attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for view
      Returns:
      A modified copy or the this object
    • withHash

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

      public final PublishViewParams withHash(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the hash 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 hash
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of PublishViewParams 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: userId, view, hash.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static PublishViewParams of(String userId, HomeTabViewPayload view)
      Construct a new immutable PublishViewParams instance.
      Parameters:
      userId - The value for the userId attribute
      view - The value for the view attribute
      Returns:
      An immutable PublishViewParams instance
    • copyOf

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

      public static PublishViewParams.Builder builder()
      Creates a builder for PublishViewParams.
       PublishViewParams.builder()
          .setUserId(String) // required userId
          .setView(com.hubspot.slack.client.models.views.HomeTabViewPayload) // required view
          .setHash(Optional<String>) // optional hash
          .build();
       
      Returns:
      A new PublishViewParams builder