1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/ec2/model/PermissionGroup.h>
10 #include <aws/core/utils/memory/stl/AWSString.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19   class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace EC2
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Describes the user or group to be added or removed from the list of create
29    * volume permissions for a volume.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolumePermission">AWS
31    * API Reference</a></p>
32    */
33   class AWS_EC2_API CreateVolumePermission
34   {
35   public:
36     CreateVolumePermission();
37     CreateVolumePermission(const Aws::Utils::Xml::XmlNode& xmlNode);
38     CreateVolumePermission& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39 
40     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41     void OutputToStream(Aws::OStream& oStream, const char* location) const;
42 
43 
44     /**
45      * <p>The group to be added or removed. The possible value is <code>all</code>.</p>
46      */
GetGroup()47     inline const PermissionGroup& GetGroup() const{ return m_group; }
48 
49     /**
50      * <p>The group to be added or removed. The possible value is <code>all</code>.</p>
51      */
GroupHasBeenSet()52     inline bool GroupHasBeenSet() const { return m_groupHasBeenSet; }
53 
54     /**
55      * <p>The group to be added or removed. The possible value is <code>all</code>.</p>
56      */
SetGroup(const PermissionGroup & value)57     inline void SetGroup(const PermissionGroup& value) { m_groupHasBeenSet = true; m_group = value; }
58 
59     /**
60      * <p>The group to be added or removed. The possible value is <code>all</code>.</p>
61      */
SetGroup(PermissionGroup && value)62     inline void SetGroup(PermissionGroup&& value) { m_groupHasBeenSet = true; m_group = std::move(value); }
63 
64     /**
65      * <p>The group to be added or removed. The possible value is <code>all</code>.</p>
66      */
WithGroup(const PermissionGroup & value)67     inline CreateVolumePermission& WithGroup(const PermissionGroup& value) { SetGroup(value); return *this;}
68 
69     /**
70      * <p>The group to be added or removed. The possible value is <code>all</code>.</p>
71      */
WithGroup(PermissionGroup && value)72     inline CreateVolumePermission& WithGroup(PermissionGroup&& value) { SetGroup(std::move(value)); return *this;}
73 
74 
75     /**
76      * <p>The ID of the Amazon Web Services account to be added or removed.</p>
77      */
GetUserId()78     inline const Aws::String& GetUserId() const{ return m_userId; }
79 
80     /**
81      * <p>The ID of the Amazon Web Services account to be added or removed.</p>
82      */
UserIdHasBeenSet()83     inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
84 
85     /**
86      * <p>The ID of the Amazon Web Services account to be added or removed.</p>
87      */
SetUserId(const Aws::String & value)88     inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; }
89 
90     /**
91      * <p>The ID of the Amazon Web Services account to be added or removed.</p>
92      */
SetUserId(Aws::String && value)93     inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); }
94 
95     /**
96      * <p>The ID of the Amazon Web Services account to be added or removed.</p>
97      */
SetUserId(const char * value)98     inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); }
99 
100     /**
101      * <p>The ID of the Amazon Web Services account to be added or removed.</p>
102      */
WithUserId(const Aws::String & value)103     inline CreateVolumePermission& WithUserId(const Aws::String& value) { SetUserId(value); return *this;}
104 
105     /**
106      * <p>The ID of the Amazon Web Services account to be added or removed.</p>
107      */
WithUserId(Aws::String && value)108     inline CreateVolumePermission& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;}
109 
110     /**
111      * <p>The ID of the Amazon Web Services account to be added or removed.</p>
112      */
WithUserId(const char * value)113     inline CreateVolumePermission& WithUserId(const char* value) { SetUserId(value); return *this;}
114 
115   private:
116 
117     PermissionGroup m_group;
118     bool m_groupHasBeenSet;
119 
120     Aws::String m_userId;
121     bool m_userIdHasBeenSet;
122   };
123 
124 } // namespace Model
125 } // namespace EC2
126 } // namespace Aws
127