/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace WorkMail { namespace Model { /** *

A rule that controls access to an WorkMail organization.

See * Also:

AWS * API Reference

*/ class AccessControlRule { public: AWS_WORKMAIL_API AccessControlRule(); AWS_WORKMAIL_API AccessControlRule(Aws::Utils::Json::JsonView jsonValue); AWS_WORKMAIL_API AccessControlRule& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_WORKMAIL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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 AccessControlRule& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The rule name.

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

The rule name.

*/ inline AccessControlRule& 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 AccessControlRule& WithEffect(const AccessControlRuleEffect& value) { SetEffect(value); return *this;} /** *

The rule effect.

*/ inline AccessControlRule& 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 AccessControlRule& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The rule description.

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

The rule description.

*/ inline AccessControlRule& 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 AccessControlRule& WithIpRanges(const Aws::Vector& value) { SetIpRanges(value); return *this;} /** *

IPv4 CIDR ranges to include in the rule.

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

IPv4 CIDR ranges to include in the rule.

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

IPv4 CIDR ranges to include in the rule.

*/ inline AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& WithNotIpRanges(const Aws::Vector& value) { SetNotIpRanges(value); return *this;} /** *

IPv4 CIDR ranges to exclude from the rule.

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

IPv4 CIDR ranges to exclude from the rule.

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

IPv4 CIDR ranges to exclude from the rule.

*/ inline AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& WithUserIds(const Aws::Vector& value) { SetUserIds(value); return *this;} /** *

User IDs to include in the rule.

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

User IDs to include in the rule.

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

User IDs to include in the rule.

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

User IDs to include in the rule.

*/ inline AccessControlRule& 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 AccessControlRule& WithNotUserIds(const Aws::Vector& value) { SetNotUserIds(value); return *this;} /** *

User IDs to exclude from the rule.

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

User IDs to exclude from the rule.

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

User IDs to exclude from the rule.

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

User IDs to exclude from the rule.

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

The date that the rule was created.

*/ inline const Aws::Utils::DateTime& GetDateCreated() const{ return m_dateCreated; } /** *

The date that the rule was created.

*/ inline bool DateCreatedHasBeenSet() const { return m_dateCreatedHasBeenSet; } /** *

The date that the rule was created.

*/ inline void SetDateCreated(const Aws::Utils::DateTime& value) { m_dateCreatedHasBeenSet = true; m_dateCreated = value; } /** *

The date that the rule was created.

*/ inline void SetDateCreated(Aws::Utils::DateTime&& value) { m_dateCreatedHasBeenSet = true; m_dateCreated = std::move(value); } /** *

The date that the rule was created.

*/ inline AccessControlRule& WithDateCreated(const Aws::Utils::DateTime& value) { SetDateCreated(value); return *this;} /** *

The date that the rule was created.

*/ inline AccessControlRule& WithDateCreated(Aws::Utils::DateTime&& value) { SetDateCreated(std::move(value)); return *this;} /** *

The date that the rule was modified.

*/ inline const Aws::Utils::DateTime& GetDateModified() const{ return m_dateModified; } /** *

The date that the rule was modified.

*/ inline bool DateModifiedHasBeenSet() const { return m_dateModifiedHasBeenSet; } /** *

The date that the rule was modified.

*/ inline void SetDateModified(const Aws::Utils::DateTime& value) { m_dateModifiedHasBeenSet = true; m_dateModified = value; } /** *

The date that the rule was modified.

*/ inline void SetDateModified(Aws::Utils::DateTime&& value) { m_dateModifiedHasBeenSet = true; m_dateModified = std::move(value); } /** *

The date that the rule was modified.

*/ inline AccessControlRule& WithDateModified(const Aws::Utils::DateTime& value) { SetDateModified(value); return *this;} /** *

The date that the rule was modified.

*/ inline AccessControlRule& WithDateModified(Aws::Utils::DateTime&& value) { SetDateModified(std::move(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 AccessControlRule& WithImpersonationRoleIds(const Aws::Vector& value) { SetImpersonationRoleIds(value); return *this;} /** *

Impersonation role IDs to include in the rule.

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

Impersonation role IDs to include in the rule.

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

Impersonation role IDs to include in the rule.

*/ inline AccessControlRule& 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 AccessControlRule& 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 AccessControlRule& WithNotImpersonationRoleIds(const Aws::Vector& value) { SetNotImpersonationRoleIds(value); return *this;} /** *

Impersonation role IDs to exclude from the rule.

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

Impersonation role IDs to exclude from the rule.

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

Impersonation role IDs to exclude from the rule.

*/ inline AccessControlRule& 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 AccessControlRule& 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::Utils::DateTime m_dateCreated; bool m_dateCreatedHasBeenSet = false; Aws::Utils::DateTime m_dateModified; bool m_dateModifiedHasBeenSet = false; Aws::Vector m_impersonationRoleIds; bool m_impersonationRoleIdsHasBeenSet = false; Aws::Vector m_notImpersonationRoleIds; bool m_notImpersonationRoleIdsHasBeenSet = false; }; } // namespace Model } // namespace WorkMail } // namespace Aws