/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace S3 { namespace Model { /** *

Container for grant information.

See Also:

AWS API * Reference

*/ class AWS_S3_API Grant { public: Grant(); Grant(const Aws::Utils::Xml::XmlNode& xmlNode); Grant& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

The person being granted permissions.

*/ inline const Grantee& GetGrantee() const{ return m_grantee; } /** *

The person being granted permissions.

*/ inline bool GranteeHasBeenSet() const { return m_granteeHasBeenSet; } /** *

The person being granted permissions.

*/ inline void SetGrantee(const Grantee& value) { m_granteeHasBeenSet = true; m_grantee = value; } /** *

The person being granted permissions.

*/ inline void SetGrantee(Grantee&& value) { m_granteeHasBeenSet = true; m_grantee = std::move(value); } /** *

The person being granted permissions.

*/ inline Grant& WithGrantee(const Grantee& value) { SetGrantee(value); return *this;} /** *

The person being granted permissions.

*/ inline Grant& WithGrantee(Grantee&& value) { SetGrantee(std::move(value)); return *this;} /** *

Specifies the permission given to the grantee.

*/ inline const Permission& GetPermission() const{ return m_permission; } /** *

Specifies the permission given to the grantee.

*/ inline bool PermissionHasBeenSet() const { return m_permissionHasBeenSet; } /** *

Specifies the permission given to the grantee.

*/ inline void SetPermission(const Permission& value) { m_permissionHasBeenSet = true; m_permission = value; } /** *

Specifies the permission given to the grantee.

*/ inline void SetPermission(Permission&& value) { m_permissionHasBeenSet = true; m_permission = std::move(value); } /** *

Specifies the permission given to the grantee.

*/ inline Grant& WithPermission(const Permission& value) { SetPermission(value); return *this;} /** *

Specifies the permission given to the grantee.

*/ inline Grant& WithPermission(Permission&& value) { SetPermission(std::move(value)); return *this;} private: Grantee m_grantee; bool m_granteeHasBeenSet; Permission m_permission; bool m_permissionHasBeenSet; }; } // namespace Model } // namespace S3 } // namespace Aws