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/cloud9/Cloud9_EXPORTS.h> 8 #include <aws/cloud9/Cloud9Request.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/cloud9/model/MemberPermissions.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Cloud9 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_CLOUD9_API CreateEnvironmentMembershipRequest : public Cloud9Request 23 { 24 public: 25 CreateEnvironmentMembershipRequest(); 26 27 // Service request name is the Operation name which will send this request out, 28 // each operation should has unique request name, so that we can get operation's name from this request. 29 // Note: this is not true for response, multiple operations may have the same response name, 30 // so we can not get operation's name from response. GetServiceRequestName()31 inline virtual const char* GetServiceRequestName() const override { return "CreateEnvironmentMembership"; } 32 33 Aws::String SerializePayload() const override; 34 35 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 36 37 38 /** 39 * <p>The ID of the environment that contains the environment member you want to 40 * add.</p> 41 */ GetEnvironmentId()42 inline const Aws::String& GetEnvironmentId() const{ return m_environmentId; } 43 44 /** 45 * <p>The ID of the environment that contains the environment member you want to 46 * add.</p> 47 */ EnvironmentIdHasBeenSet()48 inline bool EnvironmentIdHasBeenSet() const { return m_environmentIdHasBeenSet; } 49 50 /** 51 * <p>The ID of the environment that contains the environment member you want to 52 * add.</p> 53 */ SetEnvironmentId(const Aws::String & value)54 inline void SetEnvironmentId(const Aws::String& value) { m_environmentIdHasBeenSet = true; m_environmentId = value; } 55 56 /** 57 * <p>The ID of the environment that contains the environment member you want to 58 * add.</p> 59 */ SetEnvironmentId(Aws::String && value)60 inline void SetEnvironmentId(Aws::String&& value) { m_environmentIdHasBeenSet = true; m_environmentId = std::move(value); } 61 62 /** 63 * <p>The ID of the environment that contains the environment member you want to 64 * add.</p> 65 */ SetEnvironmentId(const char * value)66 inline void SetEnvironmentId(const char* value) { m_environmentIdHasBeenSet = true; m_environmentId.assign(value); } 67 68 /** 69 * <p>The ID of the environment that contains the environment member you want to 70 * add.</p> 71 */ WithEnvironmentId(const Aws::String & value)72 inline CreateEnvironmentMembershipRequest& WithEnvironmentId(const Aws::String& value) { SetEnvironmentId(value); return *this;} 73 74 /** 75 * <p>The ID of the environment that contains the environment member you want to 76 * add.</p> 77 */ WithEnvironmentId(Aws::String && value)78 inline CreateEnvironmentMembershipRequest& WithEnvironmentId(Aws::String&& value) { SetEnvironmentId(std::move(value)); return *this;} 79 80 /** 81 * <p>The ID of the environment that contains the environment member you want to 82 * add.</p> 83 */ WithEnvironmentId(const char * value)84 inline CreateEnvironmentMembershipRequest& WithEnvironmentId(const char* value) { SetEnvironmentId(value); return *this;} 85 86 87 /** 88 * <p>The Amazon Resource Name (ARN) of the environment member you want to add.</p> 89 */ GetUserArn()90 inline const Aws::String& GetUserArn() const{ return m_userArn; } 91 92 /** 93 * <p>The Amazon Resource Name (ARN) of the environment member you want to add.</p> 94 */ UserArnHasBeenSet()95 inline bool UserArnHasBeenSet() const { return m_userArnHasBeenSet; } 96 97 /** 98 * <p>The Amazon Resource Name (ARN) of the environment member you want to add.</p> 99 */ SetUserArn(const Aws::String & value)100 inline void SetUserArn(const Aws::String& value) { m_userArnHasBeenSet = true; m_userArn = value; } 101 102 /** 103 * <p>The Amazon Resource Name (ARN) of the environment member you want to add.</p> 104 */ SetUserArn(Aws::String && value)105 inline void SetUserArn(Aws::String&& value) { m_userArnHasBeenSet = true; m_userArn = std::move(value); } 106 107 /** 108 * <p>The Amazon Resource Name (ARN) of the environment member you want to add.</p> 109 */ SetUserArn(const char * value)110 inline void SetUserArn(const char* value) { m_userArnHasBeenSet = true; m_userArn.assign(value); } 111 112 /** 113 * <p>The Amazon Resource Name (ARN) of the environment member you want to add.</p> 114 */ WithUserArn(const Aws::String & value)115 inline CreateEnvironmentMembershipRequest& WithUserArn(const Aws::String& value) { SetUserArn(value); return *this;} 116 117 /** 118 * <p>The Amazon Resource Name (ARN) of the environment member you want to add.</p> 119 */ WithUserArn(Aws::String && value)120 inline CreateEnvironmentMembershipRequest& WithUserArn(Aws::String&& value) { SetUserArn(std::move(value)); return *this;} 121 122 /** 123 * <p>The Amazon Resource Name (ARN) of the environment member you want to add.</p> 124 */ WithUserArn(const char * value)125 inline CreateEnvironmentMembershipRequest& WithUserArn(const char* value) { SetUserArn(value); return *this;} 126 127 128 /** 129 * <p>The type of environment member permissions you want to associate with this 130 * environment member. Available values include:</p> <ul> <li> <p> 131 * <code>read-only</code>: Has read-only access to the environment.</p> </li> <li> 132 * <p> <code>read-write</code>: Has read-write access to the environment.</p> </li> 133 * </ul> 134 */ GetPermissions()135 inline const MemberPermissions& GetPermissions() const{ return m_permissions; } 136 137 /** 138 * <p>The type of environment member permissions you want to associate with this 139 * environment member. Available values include:</p> <ul> <li> <p> 140 * <code>read-only</code>: Has read-only access to the environment.</p> </li> <li> 141 * <p> <code>read-write</code>: Has read-write access to the environment.</p> </li> 142 * </ul> 143 */ PermissionsHasBeenSet()144 inline bool PermissionsHasBeenSet() const { return m_permissionsHasBeenSet; } 145 146 /** 147 * <p>The type of environment member permissions you want to associate with this 148 * environment member. Available values include:</p> <ul> <li> <p> 149 * <code>read-only</code>: Has read-only access to the environment.</p> </li> <li> 150 * <p> <code>read-write</code>: Has read-write access to the environment.</p> </li> 151 * </ul> 152 */ SetPermissions(const MemberPermissions & value)153 inline void SetPermissions(const MemberPermissions& value) { m_permissionsHasBeenSet = true; m_permissions = value; } 154 155 /** 156 * <p>The type of environment member permissions you want to associate with this 157 * environment member. Available values include:</p> <ul> <li> <p> 158 * <code>read-only</code>: Has read-only access to the environment.</p> </li> <li> 159 * <p> <code>read-write</code>: Has read-write access to the environment.</p> </li> 160 * </ul> 161 */ SetPermissions(MemberPermissions && value)162 inline void SetPermissions(MemberPermissions&& value) { m_permissionsHasBeenSet = true; m_permissions = std::move(value); } 163 164 /** 165 * <p>The type of environment member permissions you want to associate with this 166 * environment member. Available values include:</p> <ul> <li> <p> 167 * <code>read-only</code>: Has read-only access to the environment.</p> </li> <li> 168 * <p> <code>read-write</code>: Has read-write access to the environment.</p> </li> 169 * </ul> 170 */ WithPermissions(const MemberPermissions & value)171 inline CreateEnvironmentMembershipRequest& WithPermissions(const MemberPermissions& value) { SetPermissions(value); return *this;} 172 173 /** 174 * <p>The type of environment member permissions you want to associate with this 175 * environment member. Available values include:</p> <ul> <li> <p> 176 * <code>read-only</code>: Has read-only access to the environment.</p> </li> <li> 177 * <p> <code>read-write</code>: Has read-write access to the environment.</p> </li> 178 * </ul> 179 */ WithPermissions(MemberPermissions && value)180 inline CreateEnvironmentMembershipRequest& WithPermissions(MemberPermissions&& value) { SetPermissions(std::move(value)); return *this;} 181 182 private: 183 184 Aws::String m_environmentId; 185 bool m_environmentIdHasBeenSet; 186 187 Aws::String m_userArn; 188 bool m_userArnHasBeenSet; 189 190 MemberPermissions m_permissions; 191 bool m_permissionsHasBeenSet; 192 }; 193 194 } // namespace Model 195 } // namespace Cloud9 196 } // namespace Aws 197