Class SlackTeam

java.lang.Object
com.hubspot.slack.client.models.teams.SlackTeam
All Implemented Interfaces:
SlackTeamIF

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

Use the builder to create immutable instances: SlackTeam.builder().

  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface SlackTeamIF
      Returns:
      The value of the id attribute
    • getDomain

      public String getDomain()
      Specified by:
      getDomain in interface SlackTeamIF
      Returns:
      The value of the domain attribute
    • getName

      public Optional<String> getName()
      Specified by:
      getName in interface SlackTeamIF
      Returns:
      The value of the name attribute
    • getEnterpriseId

      public Optional<String> getEnterpriseId()
      Specified by:
      getEnterpriseId in interface SlackTeamIF
      Returns:
      The value of the enterpriseId attribute
    • getEnterpriseName

      public Optional<String> getEnterpriseName()
      Specified by:
      getEnterpriseName in interface SlackTeamIF
      Returns:
      The value of the enterpriseName attribute
    • getIcon

      public Optional<SlackTeamIcon> getIcon()
      Specified by:
      getIcon in interface SlackTeamIF
      Returns:
      The value of the icon attribute
    • withId

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

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

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

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

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

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

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

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

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

      public final SlackTeam withIcon(Optional<? extends SlackTeamIcon> optional)
      Copy the current immutable object by setting an optional value for the icon attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for icon
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of SlackTeam 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: id, domain, name, enterpriseId, enterpriseName, icon.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static SlackTeam.Builder builder()
      Creates a builder for SlackTeam.
       SlackTeam.builder()
          .setId(String) // required id
          .setDomain(String) // required domain
          .setName(Optional<String>) // optional name
          .setEnterpriseId(Optional<String>) // optional enterpriseId
          .setEnterpriseName(Optional<String>) // optional enterpriseName
          .setIcon(Optional<SlackTeamIcon>) // optional icon
          .build();
       
      Returns:
      A new SlackTeam builder