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/ram/RAM_EXPORTS.h> 8 #include <aws/ram/RAMRequest.h> 9 #include <aws/core/utils/memory/stl/AWSVector.h> 10 #include <aws/ram/model/ResourceShareStatus.h> 11 #include <aws/ram/model/ResourceOwner.h> 12 #include <aws/core/utils/memory/stl/AWSString.h> 13 #include <aws/ram/model/TagFilter.h> 14 #include <utility> 15 16 namespace Aws 17 { 18 namespace RAM 19 { 20 namespace Model 21 { 22 23 /** 24 */ 25 class AWS_RAM_API GetResourceSharesRequest : public RAMRequest 26 { 27 public: 28 GetResourceSharesRequest(); 29 30 // Service request name is the Operation name which will send this request out, 31 // each operation should has unique request name, so that we can get operation's name from this request. 32 // Note: this is not true for response, multiple operations may have the same response name, 33 // so we can not get operation's name from response. GetServiceRequestName()34 inline virtual const char* GetServiceRequestName() const override { return "GetResourceShares"; } 35 36 Aws::String SerializePayload() const override; 37 38 39 /** 40 * <p>The Amazon Resource Names (ARNs) of the resource shares.</p> 41 */ GetResourceShareArns()42 inline const Aws::Vector<Aws::String>& GetResourceShareArns() const{ return m_resourceShareArns; } 43 44 /** 45 * <p>The Amazon Resource Names (ARNs) of the resource shares.</p> 46 */ ResourceShareArnsHasBeenSet()47 inline bool ResourceShareArnsHasBeenSet() const { return m_resourceShareArnsHasBeenSet; } 48 49 /** 50 * <p>The Amazon Resource Names (ARNs) of the resource shares.</p> 51 */ SetResourceShareArns(const Aws::Vector<Aws::String> & value)52 inline void SetResourceShareArns(const Aws::Vector<Aws::String>& value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns = value; } 53 54 /** 55 * <p>The Amazon Resource Names (ARNs) of the resource shares.</p> 56 */ SetResourceShareArns(Aws::Vector<Aws::String> && value)57 inline void SetResourceShareArns(Aws::Vector<Aws::String>&& value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns = std::move(value); } 58 59 /** 60 * <p>The Amazon Resource Names (ARNs) of the resource shares.</p> 61 */ WithResourceShareArns(const Aws::Vector<Aws::String> & value)62 inline GetResourceSharesRequest& WithResourceShareArns(const Aws::Vector<Aws::String>& value) { SetResourceShareArns(value); return *this;} 63 64 /** 65 * <p>The Amazon Resource Names (ARNs) of the resource shares.</p> 66 */ WithResourceShareArns(Aws::Vector<Aws::String> && value)67 inline GetResourceSharesRequest& WithResourceShareArns(Aws::Vector<Aws::String>&& value) { SetResourceShareArns(std::move(value)); return *this;} 68 69 /** 70 * <p>The Amazon Resource Names (ARNs) of the resource shares.</p> 71 */ AddResourceShareArns(const Aws::String & value)72 inline GetResourceSharesRequest& AddResourceShareArns(const Aws::String& value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns.push_back(value); return *this; } 73 74 /** 75 * <p>The Amazon Resource Names (ARNs) of the resource shares.</p> 76 */ AddResourceShareArns(Aws::String && value)77 inline GetResourceSharesRequest& AddResourceShareArns(Aws::String&& value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns.push_back(std::move(value)); return *this; } 78 79 /** 80 * <p>The Amazon Resource Names (ARNs) of the resource shares.</p> 81 */ AddResourceShareArns(const char * value)82 inline GetResourceSharesRequest& AddResourceShareArns(const char* value) { m_resourceShareArnsHasBeenSet = true; m_resourceShareArns.push_back(value); return *this; } 83 84 85 /** 86 * <p>The status of the resource share.</p> 87 */ GetResourceShareStatus()88 inline const ResourceShareStatus& GetResourceShareStatus() const{ return m_resourceShareStatus; } 89 90 /** 91 * <p>The status of the resource share.</p> 92 */ ResourceShareStatusHasBeenSet()93 inline bool ResourceShareStatusHasBeenSet() const { return m_resourceShareStatusHasBeenSet; } 94 95 /** 96 * <p>The status of the resource share.</p> 97 */ SetResourceShareStatus(const ResourceShareStatus & value)98 inline void SetResourceShareStatus(const ResourceShareStatus& value) { m_resourceShareStatusHasBeenSet = true; m_resourceShareStatus = value; } 99 100 /** 101 * <p>The status of the resource share.</p> 102 */ SetResourceShareStatus(ResourceShareStatus && value)103 inline void SetResourceShareStatus(ResourceShareStatus&& value) { m_resourceShareStatusHasBeenSet = true; m_resourceShareStatus = std::move(value); } 104 105 /** 106 * <p>The status of the resource share.</p> 107 */ WithResourceShareStatus(const ResourceShareStatus & value)108 inline GetResourceSharesRequest& WithResourceShareStatus(const ResourceShareStatus& value) { SetResourceShareStatus(value); return *this;} 109 110 /** 111 * <p>The status of the resource share.</p> 112 */ WithResourceShareStatus(ResourceShareStatus && value)113 inline GetResourceSharesRequest& WithResourceShareStatus(ResourceShareStatus&& value) { SetResourceShareStatus(std::move(value)); return *this;} 114 115 116 /** 117 * <p>The type of owner.</p> 118 */ GetResourceOwner()119 inline const ResourceOwner& GetResourceOwner() const{ return m_resourceOwner; } 120 121 /** 122 * <p>The type of owner.</p> 123 */ ResourceOwnerHasBeenSet()124 inline bool ResourceOwnerHasBeenSet() const { return m_resourceOwnerHasBeenSet; } 125 126 /** 127 * <p>The type of owner.</p> 128 */ SetResourceOwner(const ResourceOwner & value)129 inline void SetResourceOwner(const ResourceOwner& value) { m_resourceOwnerHasBeenSet = true; m_resourceOwner = value; } 130 131 /** 132 * <p>The type of owner.</p> 133 */ SetResourceOwner(ResourceOwner && value)134 inline void SetResourceOwner(ResourceOwner&& value) { m_resourceOwnerHasBeenSet = true; m_resourceOwner = std::move(value); } 135 136 /** 137 * <p>The type of owner.</p> 138 */ WithResourceOwner(const ResourceOwner & value)139 inline GetResourceSharesRequest& WithResourceOwner(const ResourceOwner& value) { SetResourceOwner(value); return *this;} 140 141 /** 142 * <p>The type of owner.</p> 143 */ WithResourceOwner(ResourceOwner && value)144 inline GetResourceSharesRequest& WithResourceOwner(ResourceOwner&& value) { SetResourceOwner(std::move(value)); return *this;} 145 146 147 /** 148 * <p>The name of the resource share.</p> 149 */ GetName()150 inline const Aws::String& GetName() const{ return m_name; } 151 152 /** 153 * <p>The name of the resource share.</p> 154 */ NameHasBeenSet()155 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } 156 157 /** 158 * <p>The name of the resource share.</p> 159 */ SetName(const Aws::String & value)160 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } 161 162 /** 163 * <p>The name of the resource share.</p> 164 */ SetName(Aws::String && value)165 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } 166 167 /** 168 * <p>The name of the resource share.</p> 169 */ SetName(const char * value)170 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } 171 172 /** 173 * <p>The name of the resource share.</p> 174 */ WithName(const Aws::String & value)175 inline GetResourceSharesRequest& WithName(const Aws::String& value) { SetName(value); return *this;} 176 177 /** 178 * <p>The name of the resource share.</p> 179 */ WithName(Aws::String && value)180 inline GetResourceSharesRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} 181 182 /** 183 * <p>The name of the resource share.</p> 184 */ WithName(const char * value)185 inline GetResourceSharesRequest& WithName(const char* value) { SetName(value); return *this;} 186 187 188 /** 189 * <p>One or more tag filters.</p> 190 */ GetTagFilters()191 inline const Aws::Vector<TagFilter>& GetTagFilters() const{ return m_tagFilters; } 192 193 /** 194 * <p>One or more tag filters.</p> 195 */ TagFiltersHasBeenSet()196 inline bool TagFiltersHasBeenSet() const { return m_tagFiltersHasBeenSet; } 197 198 /** 199 * <p>One or more tag filters.</p> 200 */ SetTagFilters(const Aws::Vector<TagFilter> & value)201 inline void SetTagFilters(const Aws::Vector<TagFilter>& value) { m_tagFiltersHasBeenSet = true; m_tagFilters = value; } 202 203 /** 204 * <p>One or more tag filters.</p> 205 */ SetTagFilters(Aws::Vector<TagFilter> && value)206 inline void SetTagFilters(Aws::Vector<TagFilter>&& value) { m_tagFiltersHasBeenSet = true; m_tagFilters = std::move(value); } 207 208 /** 209 * <p>One or more tag filters.</p> 210 */ WithTagFilters(const Aws::Vector<TagFilter> & value)211 inline GetResourceSharesRequest& WithTagFilters(const Aws::Vector<TagFilter>& value) { SetTagFilters(value); return *this;} 212 213 /** 214 * <p>One or more tag filters.</p> 215 */ WithTagFilters(Aws::Vector<TagFilter> && value)216 inline GetResourceSharesRequest& WithTagFilters(Aws::Vector<TagFilter>&& value) { SetTagFilters(std::move(value)); return *this;} 217 218 /** 219 * <p>One or more tag filters.</p> 220 */ AddTagFilters(const TagFilter & value)221 inline GetResourceSharesRequest& AddTagFilters(const TagFilter& value) { m_tagFiltersHasBeenSet = true; m_tagFilters.push_back(value); return *this; } 222 223 /** 224 * <p>One or more tag filters.</p> 225 */ AddTagFilters(TagFilter && value)226 inline GetResourceSharesRequest& AddTagFilters(TagFilter&& value) { m_tagFiltersHasBeenSet = true; m_tagFilters.push_back(std::move(value)); return *this; } 227 228 229 /** 230 * <p>The token for the next page of results.</p> 231 */ GetNextToken()232 inline const Aws::String& GetNextToken() const{ return m_nextToken; } 233 234 /** 235 * <p>The token for the next page of results.</p> 236 */ NextTokenHasBeenSet()237 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } 238 239 /** 240 * <p>The token for the next page of results.</p> 241 */ SetNextToken(const Aws::String & value)242 inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } 243 244 /** 245 * <p>The token for the next page of results.</p> 246 */ SetNextToken(Aws::String && value)247 inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } 248 249 /** 250 * <p>The token for the next page of results.</p> 251 */ SetNextToken(const char * value)252 inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } 253 254 /** 255 * <p>The token for the next page of results.</p> 256 */ WithNextToken(const Aws::String & value)257 inline GetResourceSharesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} 258 259 /** 260 * <p>The token for the next page of results.</p> 261 */ WithNextToken(Aws::String && value)262 inline GetResourceSharesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} 263 264 /** 265 * <p>The token for the next page of results.</p> 266 */ WithNextToken(const char * value)267 inline GetResourceSharesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} 268 269 270 /** 271 * <p>The maximum number of results to return with a single call. To retrieve the 272 * remaining results, make another call with the returned <code>nextToken</code> 273 * value.</p> 274 */ GetMaxResults()275 inline int GetMaxResults() const{ return m_maxResults; } 276 277 /** 278 * <p>The maximum number of results to return with a single call. To retrieve the 279 * remaining results, make another call with the returned <code>nextToken</code> 280 * value.</p> 281 */ MaxResultsHasBeenSet()282 inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } 283 284 /** 285 * <p>The maximum number of results to return with a single call. To retrieve the 286 * remaining results, make another call with the returned <code>nextToken</code> 287 * value.</p> 288 */ SetMaxResults(int value)289 inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } 290 291 /** 292 * <p>The maximum number of results to return with a single call. To retrieve the 293 * remaining results, make another call with the returned <code>nextToken</code> 294 * value.</p> 295 */ WithMaxResults(int value)296 inline GetResourceSharesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} 297 298 299 /** 300 * <p>The Amazon Resource Name (ARN) of the RAM permission that is associated with 301 * the resource share.</p> 302 */ GetPermissionArn()303 inline const Aws::String& GetPermissionArn() const{ return m_permissionArn; } 304 305 /** 306 * <p>The Amazon Resource Name (ARN) of the RAM permission that is associated with 307 * the resource share.</p> 308 */ PermissionArnHasBeenSet()309 inline bool PermissionArnHasBeenSet() const { return m_permissionArnHasBeenSet; } 310 311 /** 312 * <p>The Amazon Resource Name (ARN) of the RAM permission that is associated with 313 * the resource share.</p> 314 */ SetPermissionArn(const Aws::String & value)315 inline void SetPermissionArn(const Aws::String& value) { m_permissionArnHasBeenSet = true; m_permissionArn = value; } 316 317 /** 318 * <p>The Amazon Resource Name (ARN) of the RAM permission that is associated with 319 * the resource share.</p> 320 */ SetPermissionArn(Aws::String && value)321 inline void SetPermissionArn(Aws::String&& value) { m_permissionArnHasBeenSet = true; m_permissionArn = std::move(value); } 322 323 /** 324 * <p>The Amazon Resource Name (ARN) of the RAM permission that is associated with 325 * the resource share.</p> 326 */ SetPermissionArn(const char * value)327 inline void SetPermissionArn(const char* value) { m_permissionArnHasBeenSet = true; m_permissionArn.assign(value); } 328 329 /** 330 * <p>The Amazon Resource Name (ARN) of the RAM permission that is associated with 331 * the resource share.</p> 332 */ WithPermissionArn(const Aws::String & value)333 inline GetResourceSharesRequest& WithPermissionArn(const Aws::String& value) { SetPermissionArn(value); return *this;} 334 335 /** 336 * <p>The Amazon Resource Name (ARN) of the RAM permission that is associated with 337 * the resource share.</p> 338 */ WithPermissionArn(Aws::String && value)339 inline GetResourceSharesRequest& WithPermissionArn(Aws::String&& value) { SetPermissionArn(std::move(value)); return *this;} 340 341 /** 342 * <p>The Amazon Resource Name (ARN) of the RAM permission that is associated with 343 * the resource share.</p> 344 */ WithPermissionArn(const char * value)345 inline GetResourceSharesRequest& WithPermissionArn(const char* value) { SetPermissionArn(value); return *this;} 346 347 private: 348 349 Aws::Vector<Aws::String> m_resourceShareArns; 350 bool m_resourceShareArnsHasBeenSet; 351 352 ResourceShareStatus m_resourceShareStatus; 353 bool m_resourceShareStatusHasBeenSet; 354 355 ResourceOwner m_resourceOwner; 356 bool m_resourceOwnerHasBeenSet; 357 358 Aws::String m_name; 359 bool m_nameHasBeenSet; 360 361 Aws::Vector<TagFilter> m_tagFilters; 362 bool m_tagFiltersHasBeenSet; 363 364 Aws::String m_nextToken; 365 bool m_nextTokenHasBeenSet; 366 367 int m_maxResults; 368 bool m_maxResultsHasBeenSet; 369 370 Aws::String m_permissionArn; 371 bool m_permissionArnHasBeenSet; 372 }; 373 374 } // namespace Model 375 } // namespace RAM 376 } // namespace Aws 377