Class MigrationExchangeResponse

java.lang.Object
com.hubspot.slack.client.models.response.migration.MigrationExchangeResponse
All Implemented Interfaces:
MigrationExchangeResponseIF, SlackResponse

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

Use the builder to create immutable instances: MigrationExchangeResponse.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
    • getTeamId

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

      public String getEnterpriseId()
      Specified by:
      getEnterpriseId in interface MigrationExchangeResponseIF
      Returns:
      The value of the enterpriseId attribute
    • getUserIdMap

      public Map<String,String> getUserIdMap()
      Specified by:
      getUserIdMap in interface MigrationExchangeResponseIF
      Returns:
      The value of the userIdMap attribute
    • getInvalidUserIds

      public Set<String> getInvalidUserIds()
      Specified by:
      getInvalidUserIds in interface MigrationExchangeResponseIF
      Returns:
      The value of the invalidUserIds attribute
    • withOk

      public final MigrationExchangeResponse 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 MigrationExchangeResponse 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 MigrationExchangeResponse 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
    • withTeamId

      public final MigrationExchangeResponse 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
    • withEnterpriseId

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

      public final MigrationExchangeResponse withUserIdMap(Map<String,? extends String> entries)
      Copy the current immutable object by replacing the userIdMap map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to replace the userIdMap map
      Returns:
      A modified copy or this if not changed
    • withInvalidUserIds

      public final MigrationExchangeResponse withInvalidUserIds(String... elements)
      Copy the current immutable object with elements that replace the content of invalidUserIds.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withInvalidUserIds

      public final MigrationExchangeResponse withInvalidUserIds(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of invalidUserIds. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of invalidUserIds elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of MigrationExchangeResponse 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, teamId, enterpriseId, userIdMap, invalidUserIds.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static MigrationExchangeResponse.Builder builder()
      Creates a builder for MigrationExchangeResponse.
       MigrationExchangeResponse.builder()
          .setOk(boolean) // required ok
          .setResponseMetadata(Optional<ResponseMetadata>) // optional responseMetadata
          .setTeamId(String) // required teamId
          .setEnterpriseId(String) // required enterpriseId
          .putUserIdMap|putAllUserIdMap(String => String) // userIdMap mappings
          .addInvalidUserIds|addAllInvalidUserIds(String) // invalidUserIds elements
          .build();
       
      Returns:
      A new MigrationExchangeResponse builder