/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace LicenseManager { namespace Model { /** */ class CreateGrantRequest : public LicenseManagerRequest { public: AWS_LICENSEMANAGER_API CreateGrantRequest(); // 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 "CreateGrant"; } AWS_LICENSEMANAGER_API Aws::String SerializePayload() const override; AWS_LICENSEMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

*/ inline CreateGrantRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

Grant name.

*/ inline const Aws::String& GetGrantName() const{ return m_grantName; } /** *

Grant name.

*/ inline bool GrantNameHasBeenSet() const { return m_grantNameHasBeenSet; } /** *

Grant name.

*/ inline void SetGrantName(const Aws::String& value) { m_grantNameHasBeenSet = true; m_grantName = value; } /** *

Grant name.

*/ inline void SetGrantName(Aws::String&& value) { m_grantNameHasBeenSet = true; m_grantName = std::move(value); } /** *

Grant name.

*/ inline void SetGrantName(const char* value) { m_grantNameHasBeenSet = true; m_grantName.assign(value); } /** *

Grant name.

*/ inline CreateGrantRequest& WithGrantName(const Aws::String& value) { SetGrantName(value); return *this;} /** *

Grant name.

*/ inline CreateGrantRequest& WithGrantName(Aws::String&& value) { SetGrantName(std::move(value)); return *this;} /** *

Grant name.

*/ inline CreateGrantRequest& WithGrantName(const char* value) { SetGrantName(value); return *this;} /** *

Amazon Resource Name (ARN) of the license.

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

Amazon Resource Name (ARN) of the license.

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

Amazon Resource Name (ARN) of the license.

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

Amazon Resource Name (ARN) of the license.

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

Amazon Resource Name (ARN) of the license.

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

Amazon Resource Name (ARN) of the license.

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

Amazon Resource Name (ARN) of the license.

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

Amazon Resource Name (ARN) of the license.

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

The grant principals. You can specify one of the following as an Amazon * Resource Name (ARN):

  • An Amazon Web Services account, which * includes only the account specified.

  • An * organizational unit (OU), which includes all accounts in the OU.

*
  • An organization, which will include all accounts across your * organization.

*/ inline const Aws::Vector& GetPrincipals() const{ return m_principals; } /** *

The grant principals. You can specify one of the following as an Amazon * Resource Name (ARN):

  • An Amazon Web Services account, which * includes only the account specified.

  • An * organizational unit (OU), which includes all accounts in the OU.

*
  • An organization, which will include all accounts across your * organization.

*/ inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; } /** *

The grant principals. You can specify one of the following as an Amazon * Resource Name (ARN):

  • An Amazon Web Services account, which * includes only the account specified.

  • An * organizational unit (OU), which includes all accounts in the OU.

*
  • An organization, which will include all accounts across your * organization.

*/ inline void SetPrincipals(const Aws::Vector& value) { m_principalsHasBeenSet = true; m_principals = value; } /** *

The grant principals. You can specify one of the following as an Amazon * Resource Name (ARN):

  • An Amazon Web Services account, which * includes only the account specified.

  • An * organizational unit (OU), which includes all accounts in the OU.

*
  • An organization, which will include all accounts across your * organization.

*/ inline void SetPrincipals(Aws::Vector&& value) { m_principalsHasBeenSet = true; m_principals = std::move(value); } /** *

The grant principals. You can specify one of the following as an Amazon * Resource Name (ARN):

  • An Amazon Web Services account, which * includes only the account specified.

  • An * organizational unit (OU), which includes all accounts in the OU.

*
  • An organization, which will include all accounts across your * organization.

*/ inline CreateGrantRequest& WithPrincipals(const Aws::Vector& value) { SetPrincipals(value); return *this;} /** *

The grant principals. You can specify one of the following as an Amazon * Resource Name (ARN):

  • An Amazon Web Services account, which * includes only the account specified.

  • An * organizational unit (OU), which includes all accounts in the OU.

*
  • An organization, which will include all accounts across your * organization.

*/ inline CreateGrantRequest& WithPrincipals(Aws::Vector&& value) { SetPrincipals(std::move(value)); return *this;} /** *

The grant principals. You can specify one of the following as an Amazon * Resource Name (ARN):

  • An Amazon Web Services account, which * includes only the account specified.

  • An * organizational unit (OU), which includes all accounts in the OU.

*
  • An organization, which will include all accounts across your * organization.

*/ inline CreateGrantRequest& AddPrincipals(const Aws::String& value) { m_principalsHasBeenSet = true; m_principals.push_back(value); return *this; } /** *

The grant principals. You can specify one of the following as an Amazon * Resource Name (ARN):

  • An Amazon Web Services account, which * includes only the account specified.

  • An * organizational unit (OU), which includes all accounts in the OU.

*
  • An organization, which will include all accounts across your * organization.

*/ inline CreateGrantRequest& AddPrincipals(Aws::String&& value) { m_principalsHasBeenSet = true; m_principals.push_back(std::move(value)); return *this; } /** *

The grant principals. You can specify one of the following as an Amazon * Resource Name (ARN):

  • An Amazon Web Services account, which * includes only the account specified.

  • An * organizational unit (OU), which includes all accounts in the OU.

*
  • An organization, which will include all accounts across your * organization.

*/ inline CreateGrantRequest& AddPrincipals(const char* value) { m_principalsHasBeenSet = true; m_principals.push_back(value); return *this; } /** *

Home Region of the grant.

*/ inline const Aws::String& GetHomeRegion() const{ return m_homeRegion; } /** *

Home Region of the grant.

*/ inline bool HomeRegionHasBeenSet() const { return m_homeRegionHasBeenSet; } /** *

Home Region of the grant.

*/ inline void SetHomeRegion(const Aws::String& value) { m_homeRegionHasBeenSet = true; m_homeRegion = value; } /** *

Home Region of the grant.

*/ inline void SetHomeRegion(Aws::String&& value) { m_homeRegionHasBeenSet = true; m_homeRegion = std::move(value); } /** *

Home Region of the grant.

*/ inline void SetHomeRegion(const char* value) { m_homeRegionHasBeenSet = true; m_homeRegion.assign(value); } /** *

Home Region of the grant.

*/ inline CreateGrantRequest& WithHomeRegion(const Aws::String& value) { SetHomeRegion(value); return *this;} /** *

Home Region of the grant.

*/ inline CreateGrantRequest& WithHomeRegion(Aws::String&& value) { SetHomeRegion(std::move(value)); return *this;} /** *

Home Region of the grant.

*/ inline CreateGrantRequest& WithHomeRegion(const char* value) { SetHomeRegion(value); return *this;} /** *

Allowed operations for the grant.

*/ inline const Aws::Vector& GetAllowedOperations() const{ return m_allowedOperations; } /** *

Allowed operations for the grant.

*/ inline bool AllowedOperationsHasBeenSet() const { return m_allowedOperationsHasBeenSet; } /** *

Allowed operations for the grant.

*/ inline void SetAllowedOperations(const Aws::Vector& value) { m_allowedOperationsHasBeenSet = true; m_allowedOperations = value; } /** *

Allowed operations for the grant.

*/ inline void SetAllowedOperations(Aws::Vector&& value) { m_allowedOperationsHasBeenSet = true; m_allowedOperations = std::move(value); } /** *

Allowed operations for the grant.

*/ inline CreateGrantRequest& WithAllowedOperations(const Aws::Vector& value) { SetAllowedOperations(value); return *this;} /** *

Allowed operations for the grant.

*/ inline CreateGrantRequest& WithAllowedOperations(Aws::Vector&& value) { SetAllowedOperations(std::move(value)); return *this;} /** *

Allowed operations for the grant.

*/ inline CreateGrantRequest& AddAllowedOperations(const AllowedOperation& value) { m_allowedOperationsHasBeenSet = true; m_allowedOperations.push_back(value); return *this; } /** *

Allowed operations for the grant.

*/ inline CreateGrantRequest& AddAllowedOperations(AllowedOperation&& value) { m_allowedOperationsHasBeenSet = true; m_allowedOperations.push_back(std::move(value)); return *this; } private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::String m_grantName; bool m_grantNameHasBeenSet = false; Aws::String m_licenseArn; bool m_licenseArnHasBeenSet = false; Aws::Vector m_principals; bool m_principalsHasBeenSet = false; Aws::String m_homeRegion; bool m_homeRegionHasBeenSet = false; Aws::Vector m_allowedOperations; bool m_allowedOperationsHasBeenSet = false; }; } // namespace Model } // namespace LicenseManager } // namespace Aws