AWS SDK for C++  0.12.9
AWS SDK for C++
AssumeRoleRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/sts/STS_EXPORTS.h>
17 #include <aws/sts/STSRequest.h>
19 
20 namespace Aws
21 {
22 namespace STS
23 {
24 namespace Model
25 {
26 
30  {
31  public:
33  Aws::String SerializePayload() const override;
34 
38  inline const Aws::String& GetRoleArn() const{ return m_roleArn; }
39 
43  inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
44 
48  inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
49 
53  inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
54 
58  inline AssumeRoleRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
59 
63  inline AssumeRoleRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(value); return *this;}
64 
68  inline AssumeRoleRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
69 
83  inline const Aws::String& GetRoleSessionName() const{ return m_roleSessionName; }
84 
98  inline void SetRoleSessionName(const Aws::String& value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName = value; }
99 
113  inline void SetRoleSessionName(Aws::String&& value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName = value; }
114 
128  inline void SetRoleSessionName(const char* value) { m_roleSessionNameHasBeenSet = true; m_roleSessionName.assign(value); }
129 
143  inline AssumeRoleRequest& WithRoleSessionName(const Aws::String& value) { SetRoleSessionName(value); return *this;}
144 
158  inline AssumeRoleRequest& WithRoleSessionName(Aws::String&& value) { SetRoleSessionName(value); return *this;}
159 
173  inline AssumeRoleRequest& WithRoleSessionName(const char* value) { SetRoleSessionName(value); return *this;}
174 
197  inline const Aws::String& GetPolicy() const{ return m_policy; }
198 
221  inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; }
222 
245  inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = value; }
246 
269  inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); }
270 
293  inline AssumeRoleRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;}
294 
317  inline AssumeRoleRequest& WithPolicy(Aws::String&& value) { SetPolicy(value); return *this;}
318 
341  inline AssumeRoleRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;}
342 
348  inline long GetDurationSeconds() const{ return m_durationSeconds; }
349 
355  inline void SetDurationSeconds(long value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; }
356 
362  inline AssumeRoleRequest& WithDurationSeconds(long value) { SetDurationSeconds(value); return *this;}
363 
379  inline const Aws::String& GetExternalId() const{ return m_externalId; }
380 
396  inline void SetExternalId(const Aws::String& value) { m_externalIdHasBeenSet = true; m_externalId = value; }
397 
413  inline void SetExternalId(Aws::String&& value) { m_externalIdHasBeenSet = true; m_externalId = value; }
414 
430  inline void SetExternalId(const char* value) { m_externalIdHasBeenSet = true; m_externalId.assign(value); }
431 
447  inline AssumeRoleRequest& WithExternalId(const Aws::String& value) { SetExternalId(value); return *this;}
448 
464  inline AssumeRoleRequest& WithExternalId(Aws::String&& value) { SetExternalId(value); return *this;}
465 
481  inline AssumeRoleRequest& WithExternalId(const char* value) { SetExternalId(value); return *this;}
482 
494  inline const Aws::String& GetSerialNumber() const{ return m_serialNumber; }
495 
507  inline void SetSerialNumber(const Aws::String& value) { m_serialNumberHasBeenSet = true; m_serialNumber = value; }
508 
520  inline void SetSerialNumber(Aws::String&& value) { m_serialNumberHasBeenSet = true; m_serialNumber = value; }
521 
533  inline void SetSerialNumber(const char* value) { m_serialNumberHasBeenSet = true; m_serialNumber.assign(value); }
534 
546  inline AssumeRoleRequest& WithSerialNumber(const Aws::String& value) { SetSerialNumber(value); return *this;}
547 
559  inline AssumeRoleRequest& WithSerialNumber(Aws::String&& value) { SetSerialNumber(value); return *this;}
560 
572  inline AssumeRoleRequest& WithSerialNumber(const char* value) { SetSerialNumber(value); return *this;}
573 
582  inline const Aws::String& GetTokenCode() const{ return m_tokenCode; }
583 
592  inline void SetTokenCode(const Aws::String& value) { m_tokenCodeHasBeenSet = true; m_tokenCode = value; }
593 
602  inline void SetTokenCode(Aws::String&& value) { m_tokenCodeHasBeenSet = true; m_tokenCode = value; }
603 
612  inline void SetTokenCode(const char* value) { m_tokenCodeHasBeenSet = true; m_tokenCode.assign(value); }
613 
622  inline AssumeRoleRequest& WithTokenCode(const Aws::String& value) { SetTokenCode(value); return *this;}
623 
632  inline AssumeRoleRequest& WithTokenCode(Aws::String&& value) { SetTokenCode(value); return *this;}
633 
642  inline AssumeRoleRequest& WithTokenCode(const char* value) { SetTokenCode(value); return *this;}
643 
644  private:
645  Aws::String m_roleArn;
646  bool m_roleArnHasBeenSet;
647  Aws::String m_roleSessionName;
648  bool m_roleSessionNameHasBeenSet;
649  Aws::String m_policy;
650  bool m_policyHasBeenSet;
651  long m_durationSeconds;
652  bool m_durationSecondsHasBeenSet;
653  Aws::String m_externalId;
654  bool m_externalIdHasBeenSet;
655  Aws::String m_serialNumber;
656  bool m_serialNumberHasBeenSet;
657  Aws::String m_tokenCode;
658  bool m_tokenCodeHasBeenSet;
659  };
660 
661 } // namespace Model
662 } // namespace STS
663 } // namespace Aws
void SetRoleSessionName(const char *value)
void SetTokenCode(Aws::String &&value)
#define AWS_STS_API
Definition: STS_EXPORTS.h:34
AssumeRoleRequest & WithRoleSessionName(Aws::String &&value)
AssumeRoleRequest & WithSerialNumber(const char *value)
const Aws::String & GetRoleArn() const
AssumeRoleRequest & WithDurationSeconds(long value)
void SetPolicy(const Aws::String &value)
void SetRoleArn(Aws::String &&value)
const Aws::String & GetTokenCode() const
void SetRoleArn(const char *value)
const Aws::String & GetSerialNumber() const
void SetTokenCode(const char *value)
AssumeRoleRequest & WithRoleSessionName(const char *value)
AssumeRoleRequest & WithRoleArn(const Aws::String &value)
AssumeRoleRequest & WithPolicy(const Aws::String &value)
void SetSerialNumber(const char *value)
void SetTokenCode(const Aws::String &value)
AssumeRoleRequest & WithPolicy(Aws::String &&value)
const Aws::String & GetExternalId() const
void SetRoleSessionName(const Aws::String &value)
void SetRoleSessionName(Aws::String &&value)
void SetSerialNumber(Aws::String &&value)
AssumeRoleRequest & WithTokenCode(Aws::String &&value)
void SetExternalId(const Aws::String &value)
AssumeRoleRequest & WithRoleArn(Aws::String &&value)
AssumeRoleRequest & WithExternalId(const Aws::String &value)
const Aws::String & GetRoleSessionName() const
void SetPolicy(Aws::String &&value)
AssumeRoleRequest & WithExternalId(Aws::String &&value)
AssumeRoleRequest & WithPolicy(const char *value)
AssumeRoleRequest & WithRoleArn(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
AssumeRoleRequest & WithExternalId(const char *value)
void SetExternalId(Aws::String &&value)
AssumeRoleRequest & WithTokenCode(const Aws::String &value)
AssumeRoleRequest & WithSerialNumber(const Aws::String &value)
AssumeRoleRequest & WithSerialNumber(Aws::String &&value)
const Aws::String & GetPolicy() const
AssumeRoleRequest & WithTokenCode(const char *value)
void SetExternalId(const char *value)
AssumeRoleRequest & WithRoleSessionName(const Aws::String &value)
void SetRoleArn(const Aws::String &value)
JSON (JavaScript Object Notation).
void SetSerialNumber(const Aws::String &value)