java.lang.Object
software.amazon.awssdk.services.cognitoidentityprovider.model.TokenValidityUnitsType
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<TokenValidityUnitsType.Builder,TokenValidityUnitsType>

@Generated("software.amazon.awssdk:codegen") public final class TokenValidityUnitsType extends Object implements SdkPojo, Serializable, ToCopyableBuilder<TokenValidityUnitsType.Builder,TokenValidityUnitsType>

The time units that, with IdTokenValidity, AccessTokenValidity, and RefreshTokenValidity, set and display the duration of ID, access, and refresh tokens for an app client. You can assign a separate token validity unit to each type of token.

See Also:
  • Method Details

    • accessToken

      public final TimeUnitsType accessToken()

      A time unit for the value that you set in the AccessTokenValidity parameter. The default AccessTokenValidity time unit is hours. AccessTokenValidity duration can range from five minutes to one day.

      If the service returns an enum value that is not available in the current SDK version, accessToken will return TimeUnitsType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from accessTokenAsString().

      Returns:
      A time unit for the value that you set in the AccessTokenValidity parameter. The default AccessTokenValidity time unit is hours. AccessTokenValidity duration can range from five minutes to one day.
      See Also:
    • accessTokenAsString

      public final String accessTokenAsString()

      A time unit for the value that you set in the AccessTokenValidity parameter. The default AccessTokenValidity time unit is hours. AccessTokenValidity duration can range from five minutes to one day.

      If the service returns an enum value that is not available in the current SDK version, accessToken will return TimeUnitsType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from accessTokenAsString().

      Returns:
      A time unit for the value that you set in the AccessTokenValidity parameter. The default AccessTokenValidity time unit is hours. AccessTokenValidity duration can range from five minutes to one day.
      See Also:
    • idToken

      public final TimeUnitsType idToken()

      A time unit for the value that you set in the IdTokenValidity parameter. The default IdTokenValidity time unit is hours. IdTokenValidity duration can range from five minutes to one day.

      If the service returns an enum value that is not available in the current SDK version, idToken will return TimeUnitsType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from idTokenAsString().

      Returns:
      A time unit for the value that you set in the IdTokenValidity parameter. The default IdTokenValidity time unit is hours. IdTokenValidity duration can range from five minutes to one day.
      See Also:
    • idTokenAsString

      public final String idTokenAsString()

      A time unit for the value that you set in the IdTokenValidity parameter. The default IdTokenValidity time unit is hours. IdTokenValidity duration can range from five minutes to one day.

      If the service returns an enum value that is not available in the current SDK version, idToken will return TimeUnitsType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from idTokenAsString().

      Returns:
      A time unit for the value that you set in the IdTokenValidity parameter. The default IdTokenValidity time unit is hours. IdTokenValidity duration can range from five minutes to one day.
      See Also:
    • refreshToken

      public final TimeUnitsType refreshToken()

      A time unit for the value that you set in the RefreshTokenValidity parameter. The default RefreshTokenValidity time unit is days. RefreshTokenValidity duration can range from 60 minutes to 10 years.

      If the service returns an enum value that is not available in the current SDK version, refreshToken will return TimeUnitsType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from refreshTokenAsString().

      Returns:
      A time unit for the value that you set in the RefreshTokenValidity parameter. The default RefreshTokenValidity time unit is days. RefreshTokenValidity duration can range from 60 minutes to 10 years.
      See Also:
    • refreshTokenAsString

      public final String refreshTokenAsString()

      A time unit for the value that you set in the RefreshTokenValidity parameter. The default RefreshTokenValidity time unit is days. RefreshTokenValidity duration can range from 60 minutes to 10 years.

      If the service returns an enum value that is not available in the current SDK version, refreshToken will return TimeUnitsType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from refreshTokenAsString().

      Returns:
      A time unit for the value that you set in the RefreshTokenValidity parameter. The default RefreshTokenValidity time unit is days. RefreshTokenValidity duration can range from 60 minutes to 10 years.
      See Also:
    • toBuilder

      public TokenValidityUnitsType.Builder toBuilder()
      Specified by:
      toBuilder in interface ToCopyableBuilder<TokenValidityUnitsType.Builder,TokenValidityUnitsType>
    • builder

      public static TokenValidityUnitsType.Builder builder()
    • serializableBuilderClass

      public static Class<? extends TokenValidityUnitsType.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Specified by:
      equalsBySdkFields in interface SdkPojo
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo