Class PublishViewParams.Builder

java.lang.Object
com.hubspot.slack.client.methods.params.views.PublishViewParams.Builder
Enclosing class:
PublishViewParams

@Generated(from="PublishViewParamsIF", generator="Immutables") @NotThreadSafe public static final class PublishViewParams.Builder extends Object
Builds instances of type PublishViewParams. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final PublishViewParams.Builder from(PublishViewParamsIF instance)
      Fill a builder with attribute values from the provided PublishViewParamsIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setUserId

      public final PublishViewParams.Builder setUserId(String userId)
      Initializes the value for the userId attribute.
      Parameters:
      userId - The value for userId
      Returns:
      this builder for use in a chained invocation
    • setView

      public final PublishViewParams.Builder setView(HomeTabViewPayload view)
      Initializes the value for the view attribute.
      Parameters:
      view - The value for view
      Returns:
      this builder for use in a chained invocation
    • setHash

      public final PublishViewParams.Builder setHash(@Nullable String hash)
      Initializes the optional value hash to hash.
      Parameters:
      hash - The value for hash, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setHash

      public final PublishViewParams.Builder setHash(Optional<String> hash)
      Initializes the optional value hash to hash.
      Parameters:
      hash - The value for hash
      Returns:
      this builder for use in a chained invocation
    • build

      public PublishViewParams build()
      Builds a new PublishViewParams.
      Returns:
      An immutable instance of PublishViewParams
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing