/** * 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 LicenseManager { namespace Model { /** */ class CreateTokenRequest : public LicenseManagerRequest { public: AWS_LICENSEMANAGER_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_LICENSEMANAGER_API Aws::String SerializePayload() const override; AWS_LICENSEMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim * of the JWT token.

*/ inline const Aws::String& GetLicenseArn() const{ return m_licenseArn; } /** *

Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim * of the JWT token.

*/ inline bool LicenseArnHasBeenSet() const { return m_licenseArnHasBeenSet; } /** *

Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim * of the JWT token.

*/ inline void SetLicenseArn(const Aws::String& value) { m_licenseArnHasBeenSet = true; m_licenseArn = value; } /** *

Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim * of the JWT token.

*/ inline void SetLicenseArn(Aws::String&& value) { m_licenseArnHasBeenSet = true; m_licenseArn = std::move(value); } /** *

Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim * of the JWT token.

*/ inline void SetLicenseArn(const char* value) { m_licenseArnHasBeenSet = true; m_licenseArn.assign(value); } /** *

Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim * of the JWT token.

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

Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim * of the JWT token.

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

Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim * of the JWT token.

*/ inline CreateTokenRequest& WithLicenseArn(const char* value) { SetLicenseArn(value); return *this;} /** *

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License * Manager does not check whether the roles are in use.

*/ inline const Aws::Vector& GetRoleArns() const{ return m_roleArns; } /** *

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License * Manager does not check whether the roles are in use.

*/ inline bool RoleArnsHasBeenSet() const { return m_roleArnsHasBeenSet; } /** *

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License * Manager does not check whether the roles are in use.

*/ inline void SetRoleArns(const Aws::Vector& value) { m_roleArnsHasBeenSet = true; m_roleArns = value; } /** *

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License * Manager does not check whether the roles are in use.

*/ inline void SetRoleArns(Aws::Vector&& value) { m_roleArnsHasBeenSet = true; m_roleArns = std::move(value); } /** *

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License * Manager does not check whether the roles are in use.

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

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License * Manager does not check whether the roles are in use.

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

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License * Manager does not check whether the roles are in use.

*/ inline CreateTokenRequest& AddRoleArns(const Aws::String& value) { m_roleArnsHasBeenSet = true; m_roleArns.push_back(value); return *this; } /** *

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License * Manager does not check whether the roles are in use.

*/ inline CreateTokenRequest& AddRoleArns(Aws::String&& value) { m_roleArnsHasBeenSet = true; m_roleArns.push_back(std::move(value)); return *this; } /** *

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License * Manager does not check whether the roles are in use.

*/ inline CreateTokenRequest& AddRoleArns(const char* value) { m_roleArnsHasBeenSet = true; m_roleArns.push_back(value); return *this; } /** *

Token expiration, in days, counted from token creation. The default is 365 * days.

*/ inline int GetExpirationInDays() const{ return m_expirationInDays; } /** *

Token expiration, in days, counted from token creation. The default is 365 * days.

*/ inline bool ExpirationInDaysHasBeenSet() const { return m_expirationInDaysHasBeenSet; } /** *

Token expiration, in days, counted from token creation. The default is 365 * days.

*/ inline void SetExpirationInDays(int value) { m_expirationInDaysHasBeenSet = true; m_expirationInDays = value; } /** *

Token expiration, in days, counted from token creation. The default is 365 * days.

*/ inline CreateTokenRequest& WithExpirationInDays(int value) { SetExpirationInDays(value); return *this;} /** *

Data specified by the caller to be included in the JWT token. The data is * mapped to the amr claim of the JWT token.

*/ inline const Aws::Vector& GetTokenProperties() const{ return m_tokenProperties; } /** *

Data specified by the caller to be included in the JWT token. The data is * mapped to the amr claim of the JWT token.

*/ inline bool TokenPropertiesHasBeenSet() const { return m_tokenPropertiesHasBeenSet; } /** *

Data specified by the caller to be included in the JWT token. The data is * mapped to the amr claim of the JWT token.

*/ inline void SetTokenProperties(const Aws::Vector& value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties = value; } /** *

Data specified by the caller to be included in the JWT token. The data is * mapped to the amr claim of the JWT token.

*/ inline void SetTokenProperties(Aws::Vector&& value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties = std::move(value); } /** *

Data specified by the caller to be included in the JWT token. The data is * mapped to the amr claim of the JWT token.

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

Data specified by the caller to be included in the JWT token. The data is * mapped to the amr claim of the JWT token.

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

Data specified by the caller to be included in the JWT token. The data is * mapped to the amr claim of the JWT token.

*/ inline CreateTokenRequest& AddTokenProperties(const Aws::String& value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties.push_back(value); return *this; } /** *

Data specified by the caller to be included in the JWT token. The data is * mapped to the amr claim of the JWT token.

*/ inline CreateTokenRequest& AddTokenProperties(Aws::String&& value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties.push_back(std::move(value)); return *this; } /** *

Data specified by the caller to be included in the JWT token. The data is * mapped to the amr claim of the JWT token.

*/ inline CreateTokenRequest& AddTokenProperties(const char* value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties.push_back(value); return *this; } /** *

Idempotency token, valid for 10 minutes.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Idempotency token, valid for 10 minutes.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Idempotency token, valid for 10 minutes.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Idempotency token, valid for 10 minutes.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Idempotency token, valid for 10 minutes.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Idempotency token, valid for 10 minutes.

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

Idempotency token, valid for 10 minutes.

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

Idempotency token, valid for 10 minutes.

*/ inline CreateTokenRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} private: Aws::String m_licenseArn; bool m_licenseArnHasBeenSet = false; Aws::Vector m_roleArns; bool m_roleArnsHasBeenSet = false; int m_expirationInDays; bool m_expirationInDaysHasBeenSet = false; Aws::Vector m_tokenProperties; bool m_tokenPropertiesHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; }; } // namespace Model } // namespace LicenseManager } // namespace Aws