Class ImmutableTokenResponse


  • @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableTokenResponse
    extends TokenResponse
    Immutable implementation of TokenResponse.

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

    • Method Detail

      • accessorId

        public java.lang.String accessorId()
        Specified by:
        accessorId in class BaseTokenResponse
        Returns:
        The value of the accessorId attribute
      • description

        public java.lang.String description()
        Specified by:
        description in class BaseTokenResponse
        Returns:
        The value of the description attribute
      • createIndex

        public java.math.BigInteger createIndex()
        Specified by:
        createIndex in class BaseTokenResponse
        Returns:
        The value of the createIndex attribute
      • modifyIndex

        public java.math.BigInteger modifyIndex()
        Specified by:
        modifyIndex in class BaseTokenResponse
        Returns:
        The value of the modifyIndex attribute
      • local

        public boolean local()
        Specified by:
        local in class BaseTokenResponse
        Returns:
        The value of the local attribute
      • createTime

        public java.util.Date createTime()
        Specified by:
        createTime in class BaseTokenResponse
        Returns:
        The value of the createTime attribute
      • hash

        public java.lang.String hash()
        Specified by:
        hash in class BaseTokenResponse
        Returns:
        The value of the hash attribute
      • secretId

        public java.lang.String secretId()
        Specified by:
        secretId in class TokenResponse
        Returns:
        The value of the secretId attribute
      • withAccessorId

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

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

        public final ImmutableTokenResponse withPolicies​(Token.PolicyLink... elements)
        Copy the current immutable object with elements that replace the content of policies.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withPolicies

        public final ImmutableTokenResponse withPolicies​(java.lang.Iterable<? extends Token.PolicyLink> elements)
        Copy the current immutable object with elements that replace the content of policies. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of policies elements to set
        Returns:
        A modified copy of this object
      • withCreateIndex

        public final ImmutableTokenResponse withCreateIndex​(java.math.BigInteger value)
        Copy the current immutable object by setting a value for the createIndex attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for createIndex
        Returns:
        A modified copy of the this object
      • withModifyIndex

        public final ImmutableTokenResponse withModifyIndex​(java.math.BigInteger value)
        Copy the current immutable object by setting a value for the modifyIndex attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for modifyIndex
        Returns:
        A modified copy of the this object
      • withLocal

        public final ImmutableTokenResponse withLocal​(boolean value)
        Copy the current immutable object by setting a value for the local attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for local
        Returns:
        A modified copy of the this object
      • withCreateTime

        public final ImmutableTokenResponse withCreateTime​(java.util.Date value)
        Copy the current immutable object by setting a value for the createTime attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for createTime
        Returns:
        A modified copy of the this object
      • withHash

        public final ImmutableTokenResponse withHash​(java.lang.String value)
        Copy the current immutable object by setting a value for the hash attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for hash
        Returns:
        A modified copy of the this object
      • withSecretId

        public final ImmutableTokenResponse withSecretId​(java.lang.String value)
        Copy the current immutable object by setting a value for the secretId attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for secretId
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableTokenResponse that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: accessorId, description, policies, createIndex, modifyIndex, local, createTime, hash, secretId.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableTokenResponse copyOf​(TokenResponse instance)
        Creates an immutable copy of a TokenResponse 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 TokenResponse instance