Interface OAuth2Credentials.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<OAuth2Credentials.Builder,
,OAuth2Credentials> SdkBuilder<OAuth2Credentials.Builder,
,OAuth2Credentials> SdkPojo
- Enclosing class:
OAuth2Credentials
public static interface OAuth2Credentials.Builder
extends SdkPojo, CopyableBuilder<OAuth2Credentials.Builder,OAuth2Credentials>
-
Method Summary
Modifier and TypeMethodDescriptionaccessToken
(String accessToken) The access token used to access the connector on your behalf.The identifier for the desired client.clientSecret
(String clientSecret) The client secret used by the OAuth client to authenticate to the authorization server.default OAuth2Credentials.Builder
oAuthRequest
(Consumer<ConnectorOAuthRequest.Builder> oAuthRequest) Sets the value of the OAuthRequest property for this object.oAuthRequest
(ConnectorOAuthRequest oAuthRequest) Sets the value of the OAuthRequest property for this object.refreshToken
(String refreshToken) The refresh token used to refresh an expired access token.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
clientId
The identifier for the desired client.
- Parameters:
clientId
- The identifier for the desired client.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
clientSecret
The client secret used by the OAuth client to authenticate to the authorization server.
- Parameters:
clientSecret
- The client secret used by the OAuth client to authenticate to the authorization server.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
accessToken
The access token used to access the connector on your behalf.
- Parameters:
accessToken
- The access token used to access the connector on your behalf.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
refreshToken
The refresh token used to refresh an expired access token.
- Parameters:
refreshToken
- The refresh token used to refresh an expired access token.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
oAuthRequest
Sets the value of the OAuthRequest property for this object.- Parameters:
oAuthRequest
- The new value for the OAuthRequest property for this object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
oAuthRequest
default OAuth2Credentials.Builder oAuthRequest(Consumer<ConnectorOAuthRequest.Builder> oAuthRequest) Sets the value of the OAuthRequest property for this object. This is a convenience method that creates an instance of theConnectorOAuthRequest.Builder
avoiding the need to create one manually viaConnectorOAuthRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tooAuthRequest(ConnectorOAuthRequest)
.- Parameters:
oAuthRequest
- a consumer that will call methods onConnectorOAuthRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-