/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace SSOOIDC { namespace Model { /** */ class CreateTokenRequest : public SSOOIDCRequest { public: AWS_SSOOIDC_API CreateTokenRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateToken"; } AWS_SSOOIDC_API Aws::String SerializePayload() const override; /** *

The unique identifier string for each client. This value should come from the * persisted result of the RegisterClient API.

*/ inline const Aws::String& GetClientId() const{ return m_clientId; } /** *

The unique identifier string for each client. This value should come from the * persisted result of the RegisterClient API.

*/ inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; } /** *

The unique identifier string for each client. This value should come from the * persisted result of the RegisterClient API.

*/ inline void SetClientId(const Aws::String& value) { m_clientIdHasBeenSet = true; m_clientId = value; } /** *

The unique identifier string for each client. This value should come from the * persisted result of the RegisterClient API.

*/ inline void SetClientId(Aws::String&& value) { m_clientIdHasBeenSet = true; m_clientId = std::move(value); } /** *

The unique identifier string for each client. This value should come from the * persisted result of the RegisterClient API.

*/ inline void SetClientId(const char* value) { m_clientIdHasBeenSet = true; m_clientId.assign(value); } /** *

The unique identifier string for each client. This value should come from the * persisted result of the RegisterClient API.

*/ inline CreateTokenRequest& WithClientId(const Aws::String& value) { SetClientId(value); return *this;} /** *

The unique identifier string for each client. This value should come from the * persisted result of the RegisterClient API.

*/ inline CreateTokenRequest& WithClientId(Aws::String&& value) { SetClientId(std::move(value)); return *this;} /** *

The unique identifier string for each client. This value should come from the * persisted result of the RegisterClient API.

*/ inline CreateTokenRequest& WithClientId(const char* value) { SetClientId(value); return *this;} /** *

A secret string generated for the client. This value should come from the * persisted result of the RegisterClient API.

*/ inline const Aws::String& GetClientSecret() const{ return m_clientSecret; } /** *

A secret string generated for the client. This value should come from the * persisted result of the RegisterClient API.

*/ inline bool ClientSecretHasBeenSet() const { return m_clientSecretHasBeenSet; } /** *

A secret string generated for the client. This value should come from the * persisted result of the RegisterClient API.

*/ inline void SetClientSecret(const Aws::String& value) { m_clientSecretHasBeenSet = true; m_clientSecret = value; } /** *

A secret string generated for the client. This value should come from the * persisted result of the RegisterClient API.

*/ inline void SetClientSecret(Aws::String&& value) { m_clientSecretHasBeenSet = true; m_clientSecret = std::move(value); } /** *

A secret string generated for the client. This value should come from the * persisted result of the RegisterClient API.

*/ inline void SetClientSecret(const char* value) { m_clientSecretHasBeenSet = true; m_clientSecret.assign(value); } /** *

A secret string generated for the client. This value should come from the * persisted result of the RegisterClient API.

*/ inline CreateTokenRequest& WithClientSecret(const Aws::String& value) { SetClientSecret(value); return *this;} /** *

A secret string generated for the client. This value should come from the * persisted result of the RegisterClient API.

*/ inline CreateTokenRequest& WithClientSecret(Aws::String&& value) { SetClientSecret(std::move(value)); return *this;} /** *

A secret string generated for the client. This value should come from the * persisted result of the RegisterClient API.

*/ inline CreateTokenRequest& WithClientSecret(const char* value) { SetClientSecret(value); return *this;} /** *

Supports grant types for the authorization code, refresh token, and device * code request. For device code requests, specify the following value:

* urn:ietf:params:oauth:grant-type:device_code

For * information about how to obtain the device code, see the * StartDeviceAuthorization topic.

*/ inline const Aws::String& GetGrantType() const{ return m_grantType; } /** *

Supports grant types for the authorization code, refresh token, and device * code request. For device code requests, specify the following value:

* urn:ietf:params:oauth:grant-type:device_code

For * information about how to obtain the device code, see the * StartDeviceAuthorization topic.

*/ inline bool GrantTypeHasBeenSet() const { return m_grantTypeHasBeenSet; } /** *

Supports grant types for the authorization code, refresh token, and device * code request. For device code requests, specify the following value:

* urn:ietf:params:oauth:grant-type:device_code

For * information about how to obtain the device code, see the * StartDeviceAuthorization topic.

*/ inline void SetGrantType(const Aws::String& value) { m_grantTypeHasBeenSet = true; m_grantType = value; } /** *

Supports grant types for the authorization code, refresh token, and device * code request. For device code requests, specify the following value:

* urn:ietf:params:oauth:grant-type:device_code

For * information about how to obtain the device code, see the * StartDeviceAuthorization topic.

*/ inline void SetGrantType(Aws::String&& value) { m_grantTypeHasBeenSet = true; m_grantType = std::move(value); } /** *

Supports grant types for the authorization code, refresh token, and device * code request. For device code requests, specify the following value:

* urn:ietf:params:oauth:grant-type:device_code

For * information about how to obtain the device code, see the * StartDeviceAuthorization topic.

*/ inline void SetGrantType(const char* value) { m_grantTypeHasBeenSet = true; m_grantType.assign(value); } /** *

Supports grant types for the authorization code, refresh token, and device * code request. For device code requests, specify the following value:

* urn:ietf:params:oauth:grant-type:device_code

For * information about how to obtain the device code, see the * StartDeviceAuthorization topic.

*/ inline CreateTokenRequest& WithGrantType(const Aws::String& value) { SetGrantType(value); return *this;} /** *

Supports grant types for the authorization code, refresh token, and device * code request. For device code requests, specify the following value:

* urn:ietf:params:oauth:grant-type:device_code

For * information about how to obtain the device code, see the * StartDeviceAuthorization topic.

*/ inline CreateTokenRequest& WithGrantType(Aws::String&& value) { SetGrantType(std::move(value)); return *this;} /** *

Supports grant types for the authorization code, refresh token, and device * code request. For device code requests, specify the following value:

* urn:ietf:params:oauth:grant-type:device_code

For * information about how to obtain the device code, see the * StartDeviceAuthorization topic.

*/ inline CreateTokenRequest& WithGrantType(const char* value) { SetGrantType(value); return *this;} /** *

Used only when calling this API for the device code grant type. This * short-term code is used to identify this authentication attempt. This should * come from an in-memory reference to the result of the * StartDeviceAuthorization API.

*/ inline const Aws::String& GetDeviceCode() const{ return m_deviceCode; } /** *

Used only when calling this API for the device code grant type. This * short-term code is used to identify this authentication attempt. This should * come from an in-memory reference to the result of the * StartDeviceAuthorization API.

*/ inline bool DeviceCodeHasBeenSet() const { return m_deviceCodeHasBeenSet; } /** *

Used only when calling this API for the device code grant type. This * short-term code is used to identify this authentication attempt. This should * come from an in-memory reference to the result of the * StartDeviceAuthorization API.

*/ inline void SetDeviceCode(const Aws::String& value) { m_deviceCodeHasBeenSet = true; m_deviceCode = value; } /** *

Used only when calling this API for the device code grant type. This * short-term code is used to identify this authentication attempt. This should * come from an in-memory reference to the result of the * StartDeviceAuthorization API.

*/ inline void SetDeviceCode(Aws::String&& value) { m_deviceCodeHasBeenSet = true; m_deviceCode = std::move(value); } /** *

Used only when calling this API for the device code grant type. This * short-term code is used to identify this authentication attempt. This should * come from an in-memory reference to the result of the * StartDeviceAuthorization API.

*/ inline void SetDeviceCode(const char* value) { m_deviceCodeHasBeenSet = true; m_deviceCode.assign(value); } /** *

Used only when calling this API for the device code grant type. This * short-term code is used to identify this authentication attempt. This should * come from an in-memory reference to the result of the * StartDeviceAuthorization API.

*/ inline CreateTokenRequest& WithDeviceCode(const Aws::String& value) { SetDeviceCode(value); return *this;} /** *

Used only when calling this API for the device code grant type. This * short-term code is used to identify this authentication attempt. This should * come from an in-memory reference to the result of the * StartDeviceAuthorization API.

*/ inline CreateTokenRequest& WithDeviceCode(Aws::String&& value) { SetDeviceCode(std::move(value)); return *this;} /** *

Used only when calling this API for the device code grant type. This * short-term code is used to identify this authentication attempt. This should * come from an in-memory reference to the result of the * StartDeviceAuthorization API.

*/ inline CreateTokenRequest& WithDeviceCode(const char* value) { SetDeviceCode(value); return *this;} /** *

The authorization code received from the authorization service. This * parameter is required to perform an authorization grant request to get access to * a token.

*/ inline const Aws::String& GetCode() const{ return m_code; } /** *

The authorization code received from the authorization service. This * parameter is required to perform an authorization grant request to get access to * a token.

*/ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } /** *

The authorization code received from the authorization service. This * parameter is required to perform an authorization grant request to get access to * a token.

*/ inline void SetCode(const Aws::String& value) { m_codeHasBeenSet = true; m_code = value; } /** *

The authorization code received from the authorization service. This * parameter is required to perform an authorization grant request to get access to * a token.

*/ inline void SetCode(Aws::String&& value) { m_codeHasBeenSet = true; m_code = std::move(value); } /** *

The authorization code received from the authorization service. This * parameter is required to perform an authorization grant request to get access to * a token.

*/ inline void SetCode(const char* value) { m_codeHasBeenSet = true; m_code.assign(value); } /** *

The authorization code received from the authorization service. This * parameter is required to perform an authorization grant request to get access to * a token.

*/ inline CreateTokenRequest& WithCode(const Aws::String& value) { SetCode(value); return *this;} /** *

The authorization code received from the authorization service. This * parameter is required to perform an authorization grant request to get access to * a token.

*/ inline CreateTokenRequest& WithCode(Aws::String&& value) { SetCode(std::move(value)); return *this;} /** *

The authorization code received from the authorization service. This * parameter is required to perform an authorization grant request to get access to * a token.

*/ inline CreateTokenRequest& WithCode(const char* value) { SetCode(value); return *this;} /** *

Currently, refreshToken is not yet implemented and is not * supported. For more information about the features and limitations of the * current IAM Identity Center OIDC implementation, see Considerations for Using * this Guide in the IAM * Identity Center OIDC API Reference.

The token used to obtain an * access token in the event that the access token is invalid or expired.

*/ inline const Aws::String& GetRefreshToken() const{ return m_refreshToken; } /** *

Currently, refreshToken is not yet implemented and is not * supported. For more information about the features and limitations of the * current IAM Identity Center OIDC implementation, see Considerations for Using * this Guide in the IAM * Identity Center OIDC API Reference.

The token used to obtain an * access token in the event that the access token is invalid or expired.

*/ inline bool RefreshTokenHasBeenSet() const { return m_refreshTokenHasBeenSet; } /** *

Currently, refreshToken is not yet implemented and is not * supported. For more information about the features and limitations of the * current IAM Identity Center OIDC implementation, see Considerations for Using * this Guide in the IAM * Identity Center OIDC API Reference.

The token used to obtain an * access token in the event that the access token is invalid or expired.

*/ inline void SetRefreshToken(const Aws::String& value) { m_refreshTokenHasBeenSet = true; m_refreshToken = value; } /** *

Currently, refreshToken is not yet implemented and is not * supported. For more information about the features and limitations of the * current IAM Identity Center OIDC implementation, see Considerations for Using * this Guide in the IAM * Identity Center OIDC API Reference.

The token used to obtain an * access token in the event that the access token is invalid or expired.

*/ inline void SetRefreshToken(Aws::String&& value) { m_refreshTokenHasBeenSet = true; m_refreshToken = std::move(value); } /** *

Currently, refreshToken is not yet implemented and is not * supported. For more information about the features and limitations of the * current IAM Identity Center OIDC implementation, see Considerations for Using * this Guide in the IAM * Identity Center OIDC API Reference.

The token used to obtain an * access token in the event that the access token is invalid or expired.

*/ inline void SetRefreshToken(const char* value) { m_refreshTokenHasBeenSet = true; m_refreshToken.assign(value); } /** *

Currently, refreshToken is not yet implemented and is not * supported. For more information about the features and limitations of the * current IAM Identity Center OIDC implementation, see Considerations for Using * this Guide in the IAM * Identity Center OIDC API Reference.

The token used to obtain an * access token in the event that the access token is invalid or expired.

*/ inline CreateTokenRequest& WithRefreshToken(const Aws::String& value) { SetRefreshToken(value); return *this;} /** *

Currently, refreshToken is not yet implemented and is not * supported. For more information about the features and limitations of the * current IAM Identity Center OIDC implementation, see Considerations for Using * this Guide in the IAM * Identity Center OIDC API Reference.

The token used to obtain an * access token in the event that the access token is invalid or expired.

*/ inline CreateTokenRequest& WithRefreshToken(Aws::String&& value) { SetRefreshToken(std::move(value)); return *this;} /** *

Currently, refreshToken is not yet implemented and is not * supported. For more information about the features and limitations of the * current IAM Identity Center OIDC implementation, see Considerations for Using * this Guide in the IAM * Identity Center OIDC API Reference.

The token used to obtain an * access token in the event that the access token is invalid or expired.

*/ inline CreateTokenRequest& WithRefreshToken(const char* value) { SetRefreshToken(value); return *this;} /** *

The list of scopes that is defined by the client. Upon authorization, this * list is used to restrict permissions when granting an access token.

*/ inline const Aws::Vector& GetScope() const{ return m_scope; } /** *

The list of scopes that is defined by the client. Upon authorization, this * list is used to restrict permissions when granting an access token.

*/ inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; } /** *

The list of scopes that is defined by the client. Upon authorization, this * list is used to restrict permissions when granting an access token.

*/ inline void SetScope(const Aws::Vector& value) { m_scopeHasBeenSet = true; m_scope = value; } /** *

The list of scopes that is defined by the client. Upon authorization, this * list is used to restrict permissions when granting an access token.

*/ inline void SetScope(Aws::Vector&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); } /** *

The list of scopes that is defined by the client. Upon authorization, this * list is used to restrict permissions when granting an access token.

*/ inline CreateTokenRequest& WithScope(const Aws::Vector& value) { SetScope(value); return *this;} /** *

The list of scopes that is defined by the client. Upon authorization, this * list is used to restrict permissions when granting an access token.

*/ inline CreateTokenRequest& WithScope(Aws::Vector&& value) { SetScope(std::move(value)); return *this;} /** *

The list of scopes that is defined by the client. Upon authorization, this * list is used to restrict permissions when granting an access token.

*/ inline CreateTokenRequest& AddScope(const Aws::String& value) { m_scopeHasBeenSet = true; m_scope.push_back(value); return *this; } /** *

The list of scopes that is defined by the client. Upon authorization, this * list is used to restrict permissions when granting an access token.

*/ inline CreateTokenRequest& AddScope(Aws::String&& value) { m_scopeHasBeenSet = true; m_scope.push_back(std::move(value)); return *this; } /** *

The list of scopes that is defined by the client. Upon authorization, this * list is used to restrict permissions when granting an access token.

*/ inline CreateTokenRequest& AddScope(const char* value) { m_scopeHasBeenSet = true; m_scope.push_back(value); return *this; } /** *

The location of the application that will receive the authorization code. * Users authorize the service to send the request to this location.

*/ inline const Aws::String& GetRedirectUri() const{ return m_redirectUri; } /** *

The location of the application that will receive the authorization code. * Users authorize the service to send the request to this location.

*/ inline bool RedirectUriHasBeenSet() const { return m_redirectUriHasBeenSet; } /** *

The location of the application that will receive the authorization code. * Users authorize the service to send the request to this location.

*/ inline void SetRedirectUri(const Aws::String& value) { m_redirectUriHasBeenSet = true; m_redirectUri = value; } /** *

The location of the application that will receive the authorization code. * Users authorize the service to send the request to this location.

*/ inline void SetRedirectUri(Aws::String&& value) { m_redirectUriHasBeenSet = true; m_redirectUri = std::move(value); } /** *

The location of the application that will receive the authorization code. * Users authorize the service to send the request to this location.

*/ inline void SetRedirectUri(const char* value) { m_redirectUriHasBeenSet = true; m_redirectUri.assign(value); } /** *

The location of the application that will receive the authorization code. * Users authorize the service to send the request to this location.

*/ inline CreateTokenRequest& WithRedirectUri(const Aws::String& value) { SetRedirectUri(value); return *this;} /** *

The location of the application that will receive the authorization code. * Users authorize the service to send the request to this location.

*/ inline CreateTokenRequest& WithRedirectUri(Aws::String&& value) { SetRedirectUri(std::move(value)); return *this;} /** *

The location of the application that will receive the authorization code. * Users authorize the service to send the request to this location.

*/ inline CreateTokenRequest& WithRedirectUri(const char* value) { SetRedirectUri(value); return *this;} private: Aws::String m_clientId; bool m_clientIdHasBeenSet = false; Aws::String m_clientSecret; bool m_clientSecretHasBeenSet = false; Aws::String m_grantType; bool m_grantTypeHasBeenSet = false; Aws::String m_deviceCode; bool m_deviceCodeHasBeenSet = false; Aws::String m_code; bool m_codeHasBeenSet = false; Aws::String m_refreshToken; bool m_refreshTokenHasBeenSet = false; Aws::Vector m_scope; bool m_scopeHasBeenSet = false; Aws::String m_redirectUri; bool m_redirectUriHasBeenSet = false; }; } // namespace Model } // namespace SSOOIDC } // namespace Aws