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 aTokenResponse
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable String
Returns the value of theaccess_token
record component.final boolean
Indicates whether some other object is "equal to" this one.@Nullable Integer
Returns the value of theexpires_in
record component.final int
hashCode()
Returns a hash code value for this object.@Nullable ZonedDateTime
Returns the value of theissued_at
record component.token()
Returns the value of thetoken
record component.final String
toString()
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 aTokenResponse
record class.- Parameters:
token
- the value for thetoken
record componentaccess_token
- the value for theaccess_token
record componentexpires_in
- the value for theexpires_in
record componentissued_at
- the value for theissued_at
record 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 thetoken
record component.- Returns:
- the value of the
token
record component
-
access_token
Returns the value of theaccess_token
record component.- Returns:
- the value of the
access_token
record component
-
expires_in
Returns the value of theexpires_in
record component.- Returns:
- the value of the
expires_in
record component
-
issued_at
Returns the value of theissued_at
record component.- Returns:
- the value of the
issued_at
record component
-