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

Describes the user or group to be added or removed from the list of create * volume permissions for a volume.

See Also:

AWS * API Reference

*/ class CreateVolumePermission { public: AWS_EC2_API CreateVolumePermission(); AWS_EC2_API CreateVolumePermission(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API CreateVolumePermission& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The group to be added or removed. The possible value is all.

*/ inline const PermissionGroup& GetGroup() const{ return m_group; } /** *

The group to be added or removed. The possible value is all.

*/ inline bool GroupHasBeenSet() const { return m_groupHasBeenSet; } /** *

The group to be added or removed. The possible value is all.

*/ inline void SetGroup(const PermissionGroup& value) { m_groupHasBeenSet = true; m_group = value; } /** *

The group to be added or removed. The possible value is all.

*/ inline void SetGroup(PermissionGroup&& value) { m_groupHasBeenSet = true; m_group = std::move(value); } /** *

The group to be added or removed. The possible value is all.

*/ inline CreateVolumePermission& WithGroup(const PermissionGroup& value) { SetGroup(value); return *this;} /** *

The group to be added or removed. The possible value is all.

*/ inline CreateVolumePermission& WithGroup(PermissionGroup&& value) { SetGroup(std::move(value)); return *this;} /** *

The ID of the Amazon Web Services account to be added or removed.

*/ inline const Aws::String& GetUserId() const{ return m_userId; } /** *

The ID of the Amazon Web Services account to be added or removed.

*/ inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; } /** *

The ID of the Amazon Web Services account to be added or removed.

*/ inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; } /** *

The ID of the Amazon Web Services account to be added or removed.

*/ inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); } /** *

The ID of the Amazon Web Services account to be added or removed.

*/ inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); } /** *

The ID of the Amazon Web Services account to be added or removed.

*/ inline CreateVolumePermission& WithUserId(const Aws::String& value) { SetUserId(value); return *this;} /** *

The ID of the Amazon Web Services account to be added or removed.

*/ inline CreateVolumePermission& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;} /** *

The ID of the Amazon Web Services account to be added or removed.

*/ inline CreateVolumePermission& WithUserId(const char* value) { SetUserId(value); return *this;} private: PermissionGroup m_group; bool m_groupHasBeenSet = false; Aws::String m_userId; bool m_userIdHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws