Class Grant
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Grant.Builder,Grant>
The Grant union represents the set of possible configuration options for the selected grant type. Exactly one member of the union must be specified, and must match the grant type selected.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal AuthorizationCodeGrantConfiguration options for theauthorization_codegrant type.static Grant.Builderbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.static GrantfromAuthorizationCode(Consumer<AuthorizationCodeGrant.Builder> authorizationCode) Create an instance of this class withauthorizationCode()initialized to the given value.static GrantfromAuthorizationCode(AuthorizationCodeGrant authorizationCode) Create an instance of this class withauthorizationCode()initialized to the given value.static GrantfromJwtBearer(Consumer<JwtBearerGrant.Builder> jwtBearer) Create an instance of this class withjwtBearer()initialized to the given value.static GrantfromJwtBearer(JwtBearerGrant jwtBearer) Create an instance of this class withjwtBearer()initialized to the given value.static GrantfromRefreshToken(Consumer<RefreshTokenGrant.Builder> refreshToken) Create an instance of this class withrefreshToken()initialized to the given value.static GrantfromRefreshToken(RefreshTokenGrant refreshToken) Create an instance of this class withrefreshToken()initialized to the given value.static GrantfromTokenExchange(Consumer<TokenExchangeGrant.Builder> tokenExchange) Create an instance of this class withtokenExchange()initialized to the given value.static GrantfromTokenExchange(TokenExchangeGrant tokenExchange) Create an instance of this class withtokenExchange()initialized to the given value.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final JwtBearerGrantConfiguration options for theurn:ietf:params:oauth:grant-type:jwt-bearergrant type.final RefreshTokenGrantConfiguration options for therefresh_tokengrant type.static Class<? extends Grant.Builder> Take this object and create a builder that contains all of the current property values of this object.final TokenExchangeGrantConfiguration options for theurn:ietf:params:oauth:grant-type:token-exchangegrant type.final StringtoString()Returns a string representation of this object.type()Retrieve an enum value representing which member of this object is populated.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
authorizationCode
Configuration options for the
authorization_codegrant type.- Returns:
- Configuration options for the
authorization_codegrant type.
-
jwtBearer
Configuration options for the
urn:ietf:params:oauth:grant-type:jwt-bearergrant type.- Returns:
- Configuration options for the
urn:ietf:params:oauth:grant-type:jwt-bearergrant type.
-
refreshToken
Configuration options for the
refresh_tokengrant type.- Returns:
- Configuration options for the
refresh_tokengrant type.
-
tokenExchange
Configuration options for the
urn:ietf:params:oauth:grant-type:token-exchangegrant type.- Returns:
- Configuration options for the
urn:ietf:params:oauth:grant-type:token-exchangegrant type.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Grant.Builder,Grant> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
fromAuthorizationCode
Create an instance of this class withauthorizationCode()initialized to the given value.Configuration options for the
authorization_codegrant type.- Parameters:
authorizationCode- Configuration options for theauthorization_codegrant type.
-
fromAuthorizationCode
public static Grant fromAuthorizationCode(Consumer<AuthorizationCodeGrant.Builder> authorizationCode) Create an instance of this class withauthorizationCode()initialized to the given value.Configuration options for the
authorization_codegrant type.- Parameters:
authorizationCode- Configuration options for theauthorization_codegrant type.
-
fromJwtBearer
Create an instance of this class withjwtBearer()initialized to the given value.Configuration options for the
urn:ietf:params:oauth:grant-type:jwt-bearergrant type.- Parameters:
jwtBearer- Configuration options for theurn:ietf:params:oauth:grant-type:jwt-bearergrant type.
-
fromJwtBearer
Create an instance of this class withjwtBearer()initialized to the given value.Configuration options for the
urn:ietf:params:oauth:grant-type:jwt-bearergrant type.- Parameters:
jwtBearer- Configuration options for theurn:ietf:params:oauth:grant-type:jwt-bearergrant type.
-
fromRefreshToken
Create an instance of this class withrefreshToken()initialized to the given value.Configuration options for the
refresh_tokengrant type.- Parameters:
refreshToken- Configuration options for therefresh_tokengrant type.
-
fromRefreshToken
Create an instance of this class withrefreshToken()initialized to the given value.Configuration options for the
refresh_tokengrant type.- Parameters:
refreshToken- Configuration options for therefresh_tokengrant type.
-
fromTokenExchange
Create an instance of this class withtokenExchange()initialized to the given value.Configuration options for the
urn:ietf:params:oauth:grant-type:token-exchangegrant type.- Parameters:
tokenExchange- Configuration options for theurn:ietf:params:oauth:grant-type:token-exchangegrant type.
-
fromTokenExchange
Create an instance of this class withtokenExchange()initialized to the given value.Configuration options for the
urn:ietf:params:oauth:grant-type:token-exchangegrant type.- Parameters:
tokenExchange- Configuration options for theurn:ietf:params:oauth:grant-type:token-exchangegrant type.
-
type
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beGrant.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beGrant.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set. -
sdkFields
-