/** * 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 WorkMail { namespace Model { /** */ class PutAccessControlRuleRequest : public WorkMailRequest { public: AWS_WORKMAIL_API PutAccessControlRuleRequest(); // 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 "PutAccessControlRule"; } AWS_WORKMAIL_API Aws::String SerializePayload() const override; AWS_WORKMAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The rule name.

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

The rule name.

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

The rule name.

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

The rule name.

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

The rule name.

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

The rule name.

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

The rule name.

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

The rule name.

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

The rule effect.

*/ inline const AccessControlRuleEffect& GetEffect() const{ return m_effect; } /** *

The rule effect.

*/ inline bool EffectHasBeenSet() const { return m_effectHasBeenSet; } /** *

The rule effect.

*/ inline void SetEffect(const AccessControlRuleEffect& value) { m_effectHasBeenSet = true; m_effect = value; } /** *

The rule effect.

*/ inline void SetEffect(AccessControlRuleEffect&& value) { m_effectHasBeenSet = true; m_effect = std::move(value); } /** *

The rule effect.

*/ inline PutAccessControlRuleRequest& WithEffect(const AccessControlRuleEffect& value) { SetEffect(value); return *this;} /** *

The rule effect.

*/ inline PutAccessControlRuleRequest& WithEffect(AccessControlRuleEffect&& value) { SetEffect(std::move(value)); return *this;} /** *

The rule description.

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

The rule description.

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

The rule description.

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

The rule description.

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

The rule description.

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

The rule description.

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

The rule description.

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

The rule description.

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

IPv4 CIDR ranges to include in the rule.

*/ inline const Aws::Vector& GetIpRanges() const{ return m_ipRanges; } /** *

IPv4 CIDR ranges to include in the rule.

*/ inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; } /** *

IPv4 CIDR ranges to include in the rule.

*/ inline void SetIpRanges(const Aws::Vector& value) { m_ipRangesHasBeenSet = true; m_ipRanges = value; } /** *

IPv4 CIDR ranges to include in the rule.

*/ inline void SetIpRanges(Aws::Vector&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = std::move(value); } /** *

IPv4 CIDR ranges to include in the rule.

*/ inline PutAccessControlRuleRequest& WithIpRanges(const Aws::Vector& value) { SetIpRanges(value); return *this;} /** *

IPv4 CIDR ranges to include in the rule.

*/ inline PutAccessControlRuleRequest& WithIpRanges(Aws::Vector&& value) { SetIpRanges(std::move(value)); return *this;} /** *

IPv4 CIDR ranges to include in the rule.

*/ inline PutAccessControlRuleRequest& AddIpRanges(const Aws::String& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; } /** *

IPv4 CIDR ranges to include in the rule.

*/ inline PutAccessControlRuleRequest& AddIpRanges(Aws::String&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(std::move(value)); return *this; } /** *

IPv4 CIDR ranges to include in the rule.

*/ inline PutAccessControlRuleRequest& AddIpRanges(const char* value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; } /** *

IPv4 CIDR ranges to exclude from the rule.

*/ inline const Aws::Vector& GetNotIpRanges() const{ return m_notIpRanges; } /** *

IPv4 CIDR ranges to exclude from the rule.

*/ inline bool NotIpRangesHasBeenSet() const { return m_notIpRangesHasBeenSet; } /** *

IPv4 CIDR ranges to exclude from the rule.

*/ inline void SetNotIpRanges(const Aws::Vector& value) { m_notIpRangesHasBeenSet = true; m_notIpRanges = value; } /** *

IPv4 CIDR ranges to exclude from the rule.

*/ inline void SetNotIpRanges(Aws::Vector&& value) { m_notIpRangesHasBeenSet = true; m_notIpRanges = std::move(value); } /** *

IPv4 CIDR ranges to exclude from the rule.

*/ inline PutAccessControlRuleRequest& WithNotIpRanges(const Aws::Vector& value) { SetNotIpRanges(value); return *this;} /** *

IPv4 CIDR ranges to exclude from the rule.

*/ inline PutAccessControlRuleRequest& WithNotIpRanges(Aws::Vector&& value) { SetNotIpRanges(std::move(value)); return *this;} /** *

IPv4 CIDR ranges to exclude from the rule.

*/ inline PutAccessControlRuleRequest& AddNotIpRanges(const Aws::String& value) { m_notIpRangesHasBeenSet = true; m_notIpRanges.push_back(value); return *this; } /** *

IPv4 CIDR ranges to exclude from the rule.

*/ inline PutAccessControlRuleRequest& AddNotIpRanges(Aws::String&& value) { m_notIpRangesHasBeenSet = true; m_notIpRanges.push_back(std::move(value)); return *this; } /** *

IPv4 CIDR ranges to exclude from the rule.

*/ inline PutAccessControlRuleRequest& AddNotIpRanges(const char* value) { m_notIpRangesHasBeenSet = true; m_notIpRanges.push_back(value); return *this; } /** *

Access protocol actions to include in the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline const Aws::Vector& GetActions() const{ return m_actions; } /** *

Access protocol actions to include in the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; } /** *

Access protocol actions to include in the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline void SetActions(const Aws::Vector& value) { m_actionsHasBeenSet = true; m_actions = value; } /** *

Access protocol actions to include in the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline void SetActions(Aws::Vector&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); } /** *

Access protocol actions to include in the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& WithActions(const Aws::Vector& value) { SetActions(value); return *this;} /** *

Access protocol actions to include in the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& WithActions(Aws::Vector&& value) { SetActions(std::move(value)); return *this;} /** *

Access protocol actions to include in the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& AddActions(const Aws::String& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *

Access protocol actions to include in the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& AddActions(Aws::String&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; } /** *

Access protocol actions to include in the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& AddActions(const char* value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *

Access protocol actions to exclude from the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline const Aws::Vector& GetNotActions() const{ return m_notActions; } /** *

Access protocol actions to exclude from the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline bool NotActionsHasBeenSet() const { return m_notActionsHasBeenSet; } /** *

Access protocol actions to exclude from the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline void SetNotActions(const Aws::Vector& value) { m_notActionsHasBeenSet = true; m_notActions = value; } /** *

Access protocol actions to exclude from the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline void SetNotActions(Aws::Vector&& value) { m_notActionsHasBeenSet = true; m_notActions = std::move(value); } /** *

Access protocol actions to exclude from the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& WithNotActions(const Aws::Vector& value) { SetNotActions(value); return *this;} /** *

Access protocol actions to exclude from the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& WithNotActions(Aws::Vector&& value) { SetNotActions(std::move(value)); return *this;} /** *

Access protocol actions to exclude from the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& AddNotActions(const Aws::String& value) { m_notActionsHasBeenSet = true; m_notActions.push_back(value); return *this; } /** *

Access protocol actions to exclude from the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& AddNotActions(Aws::String&& value) { m_notActionsHasBeenSet = true; m_notActions.push_back(std::move(value)); return *this; } /** *

Access protocol actions to exclude from the rule. Valid values include * ActiveSync, AutoDiscover, EWS, * IMAP, SMTP, WindowsOutlook, and * WebMail.

*/ inline PutAccessControlRuleRequest& AddNotActions(const char* value) { m_notActionsHasBeenSet = true; m_notActions.push_back(value); return *this; } /** *

User IDs to include in the rule.

*/ inline const Aws::Vector& GetUserIds() const{ return m_userIds; } /** *

User IDs to include in the rule.

*/ inline bool UserIdsHasBeenSet() const { return m_userIdsHasBeenSet; } /** *

User IDs to include in the rule.

*/ inline void SetUserIds(const Aws::Vector& value) { m_userIdsHasBeenSet = true; m_userIds = value; } /** *

User IDs to include in the rule.

*/ inline void SetUserIds(Aws::Vector&& value) { m_userIdsHasBeenSet = true; m_userIds = std::move(value); } /** *

User IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& WithUserIds(const Aws::Vector& value) { SetUserIds(value); return *this;} /** *

User IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& WithUserIds(Aws::Vector&& value) { SetUserIds(std::move(value)); return *this;} /** *

User IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& AddUserIds(const Aws::String& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; } /** *

User IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& AddUserIds(Aws::String&& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(std::move(value)); return *this; } /** *

User IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& AddUserIds(const char* value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; } /** *

User IDs to exclude from the rule.

*/ inline const Aws::Vector& GetNotUserIds() const{ return m_notUserIds; } /** *

User IDs to exclude from the rule.

*/ inline bool NotUserIdsHasBeenSet() const { return m_notUserIdsHasBeenSet; } /** *

User IDs to exclude from the rule.

*/ inline void SetNotUserIds(const Aws::Vector& value) { m_notUserIdsHasBeenSet = true; m_notUserIds = value; } /** *

User IDs to exclude from the rule.

*/ inline void SetNotUserIds(Aws::Vector&& value) { m_notUserIdsHasBeenSet = true; m_notUserIds = std::move(value); } /** *

User IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& WithNotUserIds(const Aws::Vector& value) { SetNotUserIds(value); return *this;} /** *

User IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& WithNotUserIds(Aws::Vector&& value) { SetNotUserIds(std::move(value)); return *this;} /** *

User IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& AddNotUserIds(const Aws::String& value) { m_notUserIdsHasBeenSet = true; m_notUserIds.push_back(value); return *this; } /** *

User IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& AddNotUserIds(Aws::String&& value) { m_notUserIdsHasBeenSet = true; m_notUserIds.push_back(std::move(value)); return *this; } /** *

User IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& AddNotUserIds(const char* value) { m_notUserIdsHasBeenSet = true; m_notUserIds.push_back(value); return *this; } /** *

The identifier of the organization.

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

The identifier of the organization.

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

The identifier of the organization.

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

The identifier of the organization.

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

The identifier of the organization.

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

The identifier of the organization.

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

The identifier of the organization.

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

The identifier of the organization.

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

Impersonation role IDs to include in the rule.

*/ inline const Aws::Vector& GetImpersonationRoleIds() const{ return m_impersonationRoleIds; } /** *

Impersonation role IDs to include in the rule.

*/ inline bool ImpersonationRoleIdsHasBeenSet() const { return m_impersonationRoleIdsHasBeenSet; } /** *

Impersonation role IDs to include in the rule.

*/ inline void SetImpersonationRoleIds(const Aws::Vector& value) { m_impersonationRoleIdsHasBeenSet = true; m_impersonationRoleIds = value; } /** *

Impersonation role IDs to include in the rule.

*/ inline void SetImpersonationRoleIds(Aws::Vector&& value) { m_impersonationRoleIdsHasBeenSet = true; m_impersonationRoleIds = std::move(value); } /** *

Impersonation role IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& WithImpersonationRoleIds(const Aws::Vector& value) { SetImpersonationRoleIds(value); return *this;} /** *

Impersonation role IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& WithImpersonationRoleIds(Aws::Vector&& value) { SetImpersonationRoleIds(std::move(value)); return *this;} /** *

Impersonation role IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& AddImpersonationRoleIds(const Aws::String& value) { m_impersonationRoleIdsHasBeenSet = true; m_impersonationRoleIds.push_back(value); return *this; } /** *

Impersonation role IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& AddImpersonationRoleIds(Aws::String&& value) { m_impersonationRoleIdsHasBeenSet = true; m_impersonationRoleIds.push_back(std::move(value)); return *this; } /** *

Impersonation role IDs to include in the rule.

*/ inline PutAccessControlRuleRequest& AddImpersonationRoleIds(const char* value) { m_impersonationRoleIdsHasBeenSet = true; m_impersonationRoleIds.push_back(value); return *this; } /** *

Impersonation role IDs to exclude from the rule.

*/ inline const Aws::Vector& GetNotImpersonationRoleIds() const{ return m_notImpersonationRoleIds; } /** *

Impersonation role IDs to exclude from the rule.

*/ inline bool NotImpersonationRoleIdsHasBeenSet() const { return m_notImpersonationRoleIdsHasBeenSet; } /** *

Impersonation role IDs to exclude from the rule.

*/ inline void SetNotImpersonationRoleIds(const Aws::Vector& value) { m_notImpersonationRoleIdsHasBeenSet = true; m_notImpersonationRoleIds = value; } /** *

Impersonation role IDs to exclude from the rule.

*/ inline void SetNotImpersonationRoleIds(Aws::Vector&& value) { m_notImpersonationRoleIdsHasBeenSet = true; m_notImpersonationRoleIds = std::move(value); } /** *

Impersonation role IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& WithNotImpersonationRoleIds(const Aws::Vector& value) { SetNotImpersonationRoleIds(value); return *this;} /** *

Impersonation role IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& WithNotImpersonationRoleIds(Aws::Vector&& value) { SetNotImpersonationRoleIds(std::move(value)); return *this;} /** *

Impersonation role IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& AddNotImpersonationRoleIds(const Aws::String& value) { m_notImpersonationRoleIdsHasBeenSet = true; m_notImpersonationRoleIds.push_back(value); return *this; } /** *

Impersonation role IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& AddNotImpersonationRoleIds(Aws::String&& value) { m_notImpersonationRoleIdsHasBeenSet = true; m_notImpersonationRoleIds.push_back(std::move(value)); return *this; } /** *

Impersonation role IDs to exclude from the rule.

*/ inline PutAccessControlRuleRequest& AddNotImpersonationRoleIds(const char* value) { m_notImpersonationRoleIdsHasBeenSet = true; m_notImpersonationRoleIds.push_back(value); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; AccessControlRuleEffect m_effect; bool m_effectHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Vector m_ipRanges; bool m_ipRangesHasBeenSet = false; Aws::Vector m_notIpRanges; bool m_notIpRangesHasBeenSet = false; Aws::Vector m_actions; bool m_actionsHasBeenSet = false; Aws::Vector m_notActions; bool m_notActionsHasBeenSet = false; Aws::Vector m_userIds; bool m_userIdsHasBeenSet = false; Aws::Vector m_notUserIds; bool m_notUserIdsHasBeenSet = false; Aws::String m_organizationId; bool m_organizationIdHasBeenSet = false; Aws::Vector m_impersonationRoleIds; bool m_impersonationRoleIdsHasBeenSet = false; Aws::Vector m_notImpersonationRoleIds; bool m_notImpersonationRoleIdsHasBeenSet = false; }; } // namespace Model } // namespace WorkMail } // namespace Aws