Class AuthTestResponse

java.lang.Object
com.hubspot.slack.client.models.response.auth.AuthTestResponse
All Implemented Interfaces:
AuthTestResponseIF, SlackResponse

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

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

  • Method Details

    • isOk

      public boolean isOk()
      Specified by:
      isOk in interface SlackResponse
      Returns:
      The value of the ok attribute
    • getResponseMetadata

      public Optional<ResponseMetadata> getResponseMetadata()
      Specified by:
      getResponseMetadata in interface SlackResponse
      Returns:
      The value of the responseMetadata attribute
    • getUrl

      public String getUrl()
      Specified by:
      getUrl in interface AuthTestResponseIF
      Returns:
      The value of the url attribute
    • getTeam

      public String getTeam()
      Specified by:
      getTeam in interface AuthTestResponseIF
      Returns:
      The value of the team attribute
    • getTeamId

      public String getTeamId()
      Specified by:
      getTeamId in interface AuthTestResponseIF
      Returns:
      The value of the teamId attribute
    • getUser

      public Optional<String> getUser()
      Specified by:
      getUser in interface AuthTestResponseIF
      Returns:
      The value of the user attribute
    • getUserId

      public Optional<String> getUserId()
      Specified by:
      getUserId in interface AuthTestResponseIF
      Returns:
      The value of the userId attribute
    • withOk

      public final AuthTestResponse withOk(boolean value)
      Copy the current immutable object by setting a value for the ok attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for ok
      Returns:
      A modified copy or the this object
    • withResponseMetadata

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

      public final AuthTestResponse withResponseMetadata(Optional<? extends ResponseMetadata> optional)
      Copy the current immutable object by setting an optional value for the responseMetadata 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 responseMetadata
      Returns:
      A modified copy or this if not changed
    • withUrl

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

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

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

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

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of AuthTestResponse 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: ok, responseMetadata, url, team, teamId, user, userId.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static AuthTestResponse.Builder builder()
      Creates a builder for AuthTestResponse.
       AuthTestResponse.builder()
          .setOk(boolean) // required ok
          .setResponseMetadata(Optional<ResponseMetadata>) // optional responseMetadata
          .setUrl(String) // required url
          .setTeam(String) // required team
          .setTeamId(String) // required teamId
          .setUser(Optional<String>) // optional user
          .setUserId(Optional<String>) // optional userId
          .build();
       
      Returns:
      A new AuthTestResponse builder