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

The idempotency token for the client request.

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

The idempotency token for the client request.

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

The idempotency token for the client request.

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

The idempotency token for the client request.

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

The idempotency token for the client request.

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

The idempotency token for the client request.

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

The idempotency token for the client request.

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

The idempotency token for the client request.

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

The WorkMail organization to create the new impersonation role within.

*/ inline const Aws::String& GetOrganizationId() const{ return m_organizationId; } /** *

The WorkMail organization to create the new impersonation role within.

*/ inline bool OrganizationIdHasBeenSet() const { return m_organizationIdHasBeenSet; } /** *

The WorkMail organization to create the new impersonation role within.

*/ inline void SetOrganizationId(const Aws::String& value) { m_organizationIdHasBeenSet = true; m_organizationId = value; } /** *

The WorkMail organization to create the new impersonation role within.

*/ inline void SetOrganizationId(Aws::String&& value) { m_organizationIdHasBeenSet = true; m_organizationId = std::move(value); } /** *

The WorkMail organization to create the new impersonation role within.

*/ inline void SetOrganizationId(const char* value) { m_organizationIdHasBeenSet = true; m_organizationId.assign(value); } /** *

The WorkMail organization to create the new impersonation role within.

*/ inline CreateImpersonationRoleRequest& WithOrganizationId(const Aws::String& value) { SetOrganizationId(value); return *this;} /** *

The WorkMail organization to create the new impersonation role within.

*/ inline CreateImpersonationRoleRequest& WithOrganizationId(Aws::String&& value) { SetOrganizationId(std::move(value)); return *this;} /** *

The WorkMail organization to create the new impersonation role within.

*/ inline CreateImpersonationRoleRequest& WithOrganizationId(const char* value) { SetOrganizationId(value); return *this;} /** *

The name of the new impersonation role.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the new impersonation role.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the new impersonation role.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the new impersonation role.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the new impersonation role.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the new impersonation role.

*/ inline CreateImpersonationRoleRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the new impersonation role.

*/ inline CreateImpersonationRoleRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the new impersonation role.

*/ inline CreateImpersonationRoleRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The impersonation role's type. The available impersonation role types are * READ_ONLY or FULL_ACCESS.

*/ inline const ImpersonationRoleType& GetType() const{ return m_type; } /** *

The impersonation role's type. The available impersonation role types are * READ_ONLY or FULL_ACCESS.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The impersonation role's type. The available impersonation role types are * READ_ONLY or FULL_ACCESS.

*/ inline void SetType(const ImpersonationRoleType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The impersonation role's type. The available impersonation role types are * READ_ONLY or FULL_ACCESS.

*/ inline void SetType(ImpersonationRoleType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The impersonation role's type. The available impersonation role types are * READ_ONLY or FULL_ACCESS.

*/ inline CreateImpersonationRoleRequest& WithType(const ImpersonationRoleType& value) { SetType(value); return *this;} /** *

The impersonation role's type. The available impersonation role types are * READ_ONLY or FULL_ACCESS.

*/ inline CreateImpersonationRoleRequest& WithType(ImpersonationRoleType&& value) { SetType(std::move(value)); return *this;} /** *

The description of the new impersonation role.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the new impersonation role.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the new impersonation role.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the new impersonation role.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the new impersonation role.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the new impersonation role.

*/ inline CreateImpersonationRoleRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the new impersonation role.

*/ inline CreateImpersonationRoleRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the new impersonation role.

*/ inline CreateImpersonationRoleRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The list of rules for the impersonation role.

*/ inline const Aws::Vector& GetRules() const{ return m_rules; } /** *

The list of rules for the impersonation role.

*/ inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; } /** *

The list of rules for the impersonation role.

*/ inline void SetRules(const Aws::Vector& value) { m_rulesHasBeenSet = true; m_rules = value; } /** *

The list of rules for the impersonation role.

*/ inline void SetRules(Aws::Vector&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); } /** *

The list of rules for the impersonation role.

*/ inline CreateImpersonationRoleRequest& WithRules(const Aws::Vector& value) { SetRules(value); return *this;} /** *

The list of rules for the impersonation role.

*/ inline CreateImpersonationRoleRequest& WithRules(Aws::Vector&& value) { SetRules(std::move(value)); return *this;} /** *

The list of rules for the impersonation role.

*/ inline CreateImpersonationRoleRequest& AddRules(const ImpersonationRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; } /** *

The list of rules for the impersonation role.

*/ inline CreateImpersonationRoleRequest& AddRules(ImpersonationRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(std::move(value)); return *this; } private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::String m_organizationId; bool m_organizationIdHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; ImpersonationRoleType m_type; bool m_typeHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Vector m_rules; bool m_rulesHasBeenSet = false; }; } // namespace Model } // namespace WorkMail } // namespace Aws