Class ConversationOpenParams.Builder

java.lang.Object
com.hubspot.slack.client.methods.params.conversations.ConversationOpenParams.Builder
Enclosing class:
ConversationOpenParams

@Generated(from="ConversationOpenParamsIF", generator="Immutables") @NotThreadSafe public static final class ConversationOpenParams.Builder extends Object
Builds instances of type ConversationOpenParams. 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

      Fill a builder with attribute values from the provided ConversationOpenParamsIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setChannelId

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

      public final ConversationOpenParams.Builder setChannelId(Optional<String> channelId)
      Initializes the optional value channelId to channelId.
      Parameters:
      channelId - The value for channelId
      Returns:
      this builder for use in a chained invocation
    • addUsers

      public final ConversationOpenParams.Builder addUsers(String element)
      Adds one element to users list.
      Parameters:
      element - A users element
      Returns:
      this builder for use in a chained invocation
    • addUsers

      public final ConversationOpenParams.Builder addUsers(String... elements)
      Adds elements to users list.
      Parameters:
      elements - An array of users elements
      Returns:
      this builder for use in a chained invocation
    • setUsers

      public final ConversationOpenParams.Builder setUsers(Iterable<String> elements)
      Sets or replaces all elements for users list.
      Parameters:
      elements - An iterable of users elements
      Returns:
      this builder for use in a chained invocation
    • addAllUsers

      public final ConversationOpenParams.Builder addAllUsers(Iterable<String> elements)
      Adds elements to users list.
      Parameters:
      elements - An iterable of users elements
      Returns:
      this builder for use in a chained invocation
    • setReturnIm

      public final ConversationOpenParams.Builder setReturnIm(boolean returnIm)
      Initializes the value for the returnIm attribute.

      If not set, this attribute will have a default value as returned by the initializer of returnIm.

      Parameters:
      returnIm - The value for returnIm
      Returns:
      this builder for use in a chained invocation
    • build

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