/** * 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 { /** *

Permission granted to a user, group, or resource to access a certain aspect * of another user, group, or resource mailbox.

See Also:

AWS * API Reference

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

The identifier of the user, group, or resource to which the permissions are * granted.

*/ inline const Aws::String& GetGranteeId() const{ return m_granteeId; } /** *

The identifier of the user, group, or resource to which the permissions are * granted.

*/ inline bool GranteeIdHasBeenSet() const { return m_granteeIdHasBeenSet; } /** *

The identifier of the user, group, or resource to which the permissions are * granted.

*/ inline void SetGranteeId(const Aws::String& value) { m_granteeIdHasBeenSet = true; m_granteeId = value; } /** *

The identifier of the user, group, or resource to which the permissions are * granted.

*/ inline void SetGranteeId(Aws::String&& value) { m_granteeIdHasBeenSet = true; m_granteeId = std::move(value); } /** *

The identifier of the user, group, or resource to which the permissions are * granted.

*/ inline void SetGranteeId(const char* value) { m_granteeIdHasBeenSet = true; m_granteeId.assign(value); } /** *

The identifier of the user, group, or resource to which the permissions are * granted.

*/ inline Permission& WithGranteeId(const Aws::String& value) { SetGranteeId(value); return *this;} /** *

The identifier of the user, group, or resource to which the permissions are * granted.

*/ inline Permission& WithGranteeId(Aws::String&& value) { SetGranteeId(std::move(value)); return *this;} /** *

The identifier of the user, group, or resource to which the permissions are * granted.

*/ inline Permission& WithGranteeId(const char* value) { SetGranteeId(value); return *this;} /** *

The type of user, group, or resource referred to in GranteeId.

*/ inline const MemberType& GetGranteeType() const{ return m_granteeType; } /** *

The type of user, group, or resource referred to in GranteeId.

*/ inline bool GranteeTypeHasBeenSet() const { return m_granteeTypeHasBeenSet; } /** *

The type of user, group, or resource referred to in GranteeId.

*/ inline void SetGranteeType(const MemberType& value) { m_granteeTypeHasBeenSet = true; m_granteeType = value; } /** *

The type of user, group, or resource referred to in GranteeId.

*/ inline void SetGranteeType(MemberType&& value) { m_granteeTypeHasBeenSet = true; m_granteeType = std::move(value); } /** *

The type of user, group, or resource referred to in GranteeId.

*/ inline Permission& WithGranteeType(const MemberType& value) { SetGranteeType(value); return *this;} /** *

The type of user, group, or resource referred to in GranteeId.

*/ inline Permission& WithGranteeType(MemberType&& value) { SetGranteeType(std::move(value)); return *this;} /** *

The permissions granted to the grantee. SEND_AS allows the grantee to send * email as the owner of the mailbox (the grantee is not mentioned on these * emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner * of the mailbox (the grantee is not mentioned as the physical sender of these * emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective * of other folder-level permissions set on the mailbox.

*/ inline const Aws::Vector& GetPermissionValues() const{ return m_permissionValues; } /** *

The permissions granted to the grantee. SEND_AS allows the grantee to send * email as the owner of the mailbox (the grantee is not mentioned on these * emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner * of the mailbox (the grantee is not mentioned as the physical sender of these * emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective * of other folder-level permissions set on the mailbox.

*/ inline bool PermissionValuesHasBeenSet() const { return m_permissionValuesHasBeenSet; } /** *

The permissions granted to the grantee. SEND_AS allows the grantee to send * email as the owner of the mailbox (the grantee is not mentioned on these * emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner * of the mailbox (the grantee is not mentioned as the physical sender of these * emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective * of other folder-level permissions set on the mailbox.

*/ inline void SetPermissionValues(const Aws::Vector& value) { m_permissionValuesHasBeenSet = true; m_permissionValues = value; } /** *

The permissions granted to the grantee. SEND_AS allows the grantee to send * email as the owner of the mailbox (the grantee is not mentioned on these * emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner * of the mailbox (the grantee is not mentioned as the physical sender of these * emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective * of other folder-level permissions set on the mailbox.

*/ inline void SetPermissionValues(Aws::Vector&& value) { m_permissionValuesHasBeenSet = true; m_permissionValues = std::move(value); } /** *

The permissions granted to the grantee. SEND_AS allows the grantee to send * email as the owner of the mailbox (the grantee is not mentioned on these * emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner * of the mailbox (the grantee is not mentioned as the physical sender of these * emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective * of other folder-level permissions set on the mailbox.

*/ inline Permission& WithPermissionValues(const Aws::Vector& value) { SetPermissionValues(value); return *this;} /** *

The permissions granted to the grantee. SEND_AS allows the grantee to send * email as the owner of the mailbox (the grantee is not mentioned on these * emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner * of the mailbox (the grantee is not mentioned as the physical sender of these * emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective * of other folder-level permissions set on the mailbox.

*/ inline Permission& WithPermissionValues(Aws::Vector&& value) { SetPermissionValues(std::move(value)); return *this;} /** *

The permissions granted to the grantee. SEND_AS allows the grantee to send * email as the owner of the mailbox (the grantee is not mentioned on these * emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner * of the mailbox (the grantee is not mentioned as the physical sender of these * emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective * of other folder-level permissions set on the mailbox.

*/ inline Permission& AddPermissionValues(const PermissionType& value) { m_permissionValuesHasBeenSet = true; m_permissionValues.push_back(value); return *this; } /** *

The permissions granted to the grantee. SEND_AS allows the grantee to send * email as the owner of the mailbox (the grantee is not mentioned on these * emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner * of the mailbox (the grantee is not mentioned as the physical sender of these * emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective * of other folder-level permissions set on the mailbox.

*/ inline Permission& AddPermissionValues(PermissionType&& value) { m_permissionValuesHasBeenSet = true; m_permissionValues.push_back(std::move(value)); return *this; } private: Aws::String m_granteeId; bool m_granteeIdHasBeenSet = false; MemberType m_granteeType; bool m_granteeTypeHasBeenSet = false; Aws::Vector m_permissionValues; bool m_permissionValuesHasBeenSet = false; }; } // namespace Model } // namespace WorkMail } // namespace Aws