Package land.oras.auth
Record Class HttpClient.TokenResponse
java.lang.Object
java.lang.Record
land.oras.auth.HttpClient.TokenResponse
- Record Components:
token- The tokenaccess_token- The access tokenexpires_in- The expires inissued_at- The issued at
- Enclosing class:
- HttpClient
public static record HttpClient.TokenResponse(String token, @Nullable String access_token, @Nullable Integer expires_in, @Nullable ZonedDateTime issued_at)
extends Record
The token response
-
Constructor Summary
ConstructorsConstructorDescriptionTokenResponse(String token, @Nullable String access_token, @Nullable Integer expires_in, @Nullable ZonedDateTime issued_at) Creates an instance of aTokenResponserecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of theaccess_tokenrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable IntegerReturns the value of theexpires_inrecord component.final inthashCode()Returns a hash code value for this object.@Nullable ZonedDateTimeReturns the value of theissued_atrecord component.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TokenResponse
public TokenResponse(String token, @Nullable String access_token, @Nullable Integer expires_in, @Nullable ZonedDateTime issued_at) Creates an instance of aTokenResponserecord class.- Parameters:
token- the value for thetokenrecord componentaccess_token- the value for theaccess_tokenrecord componentexpires_in- the value for theexpires_inrecord componentissued_at- the value for theissued_atrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
access_token
Returns the value of theaccess_tokenrecord component.- Returns:
- the value of the
access_tokenrecord component
-
expires_in
Returns the value of theexpires_inrecord component.- Returns:
- the value of the
expires_inrecord component
-
issued_at
Returns the value of theissued_atrecord component.- Returns:
- the value of the
issued_atrecord component
-