Class SlackChannel.Builder

java.lang.Object
com.hubspot.slack.client.models.SlackChannel.Builder
Enclosing class:
SlackChannel

@Generated(from="SlackChannelIF", generator="Immutables") @NotThreadSafe public static final class SlackChannel.Builder extends Object
Builds instances of type SlackChannel. 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 SlackChannel.Builder from(SlackChannelIF instance)
      Fill a builder with attribute values from the provided SlackChannelIF 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
    • setId

      public final SlackChannel.Builder setId(String id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id
      Returns:
      this builder for use in a chained invocation
    • setName

      public final SlackChannel.Builder setName(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • setIsArchived

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

      public final SlackChannel.Builder setIsArchived(Optional<Boolean> isArchived)
      Initializes the optional value isArchived to isArchived.
      Parameters:
      isArchived - The value for isArchived
      Returns:
      this builder for use in a chained invocation
    • setIsGeneral

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

      public final SlackChannel.Builder setIsGeneral(Optional<Boolean> isGeneral)
      Initializes the optional value isGeneral to isGeneral.
      Parameters:
      isGeneral - The value for isGeneral
      Returns:
      this builder for use in a chained invocation
    • setIsPrivate

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

      public final SlackChannel.Builder setIsPrivate(Optional<Boolean> isPrivate)
      Initializes the optional value isPrivate to isPrivate.
      Parameters:
      isPrivate - The value for isPrivate
      Returns:
      this builder for use in a chained invocation
    • setIsMember

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

      public final SlackChannel.Builder setIsMember(Optional<Boolean> isMember)
      Initializes the optional value isMember to isMember.
      Parameters:
      isMember - The value for isMember
      Returns:
      this builder for use in a chained invocation
    • setIsShared

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

      public final SlackChannel.Builder setIsShared(Optional<Boolean> isShared)
      Initializes the optional value isShared to isShared.
      Parameters:
      isShared - The value for isShared
      Returns:
      this builder for use in a chained invocation
    • build

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