Class SlackTeam.Builder

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

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

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

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

      public final SlackTeam.Builder setName(Optional<String> name)
      Initializes the optional value name to name.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • setEnterpriseId

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

      public final SlackTeam.Builder setEnterpriseId(Optional<String> enterpriseId)
      Initializes the optional value enterpriseId to enterpriseId.
      Parameters:
      enterpriseId - The value for enterpriseId
      Returns:
      this builder for use in a chained invocation
    • setEnterpriseName

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

      public final SlackTeam.Builder setEnterpriseName(Optional<String> enterpriseName)
      Initializes the optional value enterpriseName to enterpriseName.
      Parameters:
      enterpriseName - The value for enterpriseName
      Returns:
      this builder for use in a chained invocation
    • setIcon

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

      public final SlackTeam.Builder setIcon(Optional<? extends SlackTeamIcon> icon)
      Initializes the optional value icon to icon.
      Parameters:
      icon - The value for icon
      Returns:
      this builder for use in a chained invocation
    • build

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