Class ImmutableApiKeyResponse

java.lang.Object
com.iland.core.web.rest.response.iam.ImmutableApiKeyResponse
All Implemented Interfaces:
ApiKeyResponse

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

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

  • Method Details

    • companyId

      public String companyId()
      The crmId of the company requesting the api keys
      Specified by:
      companyId in interface ApiKeyResponse
    • clientId

      public String clientId()
      The clientId represents the client key
      Specified by:
      clientId in interface ApiKeyResponse
    • id

      public String id()
      The id represents client in keycloak
      Specified by:
      id in interface ApiKeyResponse
    • clientSecret

      public String clientSecret()
      The clientSecret represents secret generated in keycloak
      Specified by:
      clientSecret in interface ApiKeyResponse
    • description

      public Optional<String> description()
      The description of the client set by the company admin
      Specified by:
      description in interface ApiKeyResponse
    • withCompanyId

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

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

      public final ImmutableApiKeyResponse 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 of the this object
    • withClientSecret

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

      public final ImmutableApiKeyResponse withDescription(String value)
      Copy the current immutable object by setting a present value for the optional description attribute.
      Parameters:
      value - The value for description
      Returns:
      A modified copy of this object
    • withDescription

      public final ImmutableApiKeyResponse withDescription(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the description attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for description
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableApiKeyResponse 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: companyId, clientId, id, clientSecret, description.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableApiKeyResponse.Builder builder()
      Creates a builder for ImmutableApiKeyResponse.
       ImmutableApiKeyResponse.builder()
          .companyId(String) // required companyId
          .clientId(String) // required clientId
          .id(String) // required id
          .clientSecret(String) // required clientSecret
          .description(String) // optional description
          .build();
       
      Returns:
      A new ImmutableApiKeyResponse builder