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/sso/SSO_EXPORTS.h> 8 #include <aws/sso/SSORequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Http 15 { 16 class URI; 17 } //namespace Http 18 namespace SSO 19 { 20 namespace Model 21 { 22 23 /** 24 */ 25 class AWS_SSO_API GetRoleCredentialsRequest : public SSORequest 26 { 27 public: 28 GetRoleCredentialsRequest(); 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 "GetRoleCredentials"; } 35 36 Aws::String SerializePayload() const override; 37 38 void AddQueryStringParameters(Aws::Http::URI& uri) const override; 39 40 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 41 42 43 /** 44 * <p>The friendly name of the role that is assigned to the user.</p> 45 */ GetRoleName()46 inline const Aws::String& GetRoleName() const{ return m_roleName; } 47 48 /** 49 * <p>The friendly name of the role that is assigned to the user.</p> 50 */ RoleNameHasBeenSet()51 inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; } 52 53 /** 54 * <p>The friendly name of the role that is assigned to the user.</p> 55 */ SetRoleName(const Aws::String & value)56 inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; } 57 58 /** 59 * <p>The friendly name of the role that is assigned to the user.</p> 60 */ SetRoleName(Aws::String && value)61 inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); } 62 63 /** 64 * <p>The friendly name of the role that is assigned to the user.</p> 65 */ SetRoleName(const char * value)66 inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); } 67 68 /** 69 * <p>The friendly name of the role that is assigned to the user.</p> 70 */ WithRoleName(const Aws::String & value)71 inline GetRoleCredentialsRequest& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;} 72 73 /** 74 * <p>The friendly name of the role that is assigned to the user.</p> 75 */ WithRoleName(Aws::String && value)76 inline GetRoleCredentialsRequest& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;} 77 78 /** 79 * <p>The friendly name of the role that is assigned to the user.</p> 80 */ WithRoleName(const char * value)81 inline GetRoleCredentialsRequest& WithRoleName(const char* value) { SetRoleName(value); return *this;} 82 83 84 /** 85 * <p>The identifier for the AWS account that is assigned to the user.</p> 86 */ GetAccountId()87 inline const Aws::String& GetAccountId() const{ return m_accountId; } 88 89 /** 90 * <p>The identifier for the AWS account that is assigned to the user.</p> 91 */ AccountIdHasBeenSet()92 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; } 93 94 /** 95 * <p>The identifier for the AWS account that is assigned to the user.</p> 96 */ SetAccountId(const Aws::String & value)97 inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; } 98 99 /** 100 * <p>The identifier for the AWS account that is assigned to the user.</p> 101 */ SetAccountId(Aws::String && value)102 inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); } 103 104 /** 105 * <p>The identifier for the AWS account that is assigned to the user.</p> 106 */ SetAccountId(const char * value)107 inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); } 108 109 /** 110 * <p>The identifier for the AWS account that is assigned to the user.</p> 111 */ WithAccountId(const Aws::String & value)112 inline GetRoleCredentialsRequest& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;} 113 114 /** 115 * <p>The identifier for the AWS account that is assigned to the user.</p> 116 */ WithAccountId(Aws::String && value)117 inline GetRoleCredentialsRequest& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;} 118 119 /** 120 * <p>The identifier for the AWS account that is assigned to the user.</p> 121 */ WithAccountId(const char * value)122 inline GetRoleCredentialsRequest& WithAccountId(const char* value) { SetAccountId(value); return *this;} 123 124 125 /** 126 * <p>The token issued by the <code>CreateToken</code> API call. For more 127 * information, see <a 128 * href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> 129 * in the <i>AWS SSO OIDC API Reference Guide</i>.</p> 130 */ GetAccessToken()131 inline const Aws::String& GetAccessToken() const{ return m_accessToken; } 132 133 /** 134 * <p>The token issued by the <code>CreateToken</code> API call. For more 135 * information, see <a 136 * href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> 137 * in the <i>AWS SSO OIDC API Reference Guide</i>.</p> 138 */ AccessTokenHasBeenSet()139 inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; } 140 141 /** 142 * <p>The token issued by the <code>CreateToken</code> API call. For more 143 * information, see <a 144 * href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> 145 * in the <i>AWS SSO OIDC API Reference Guide</i>.</p> 146 */ SetAccessToken(const Aws::String & value)147 inline void SetAccessToken(const Aws::String& value) { m_accessTokenHasBeenSet = true; m_accessToken = value; } 148 149 /** 150 * <p>The token issued by the <code>CreateToken</code> API call. For more 151 * information, see <a 152 * href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> 153 * in the <i>AWS SSO OIDC API Reference Guide</i>.</p> 154 */ SetAccessToken(Aws::String && value)155 inline void SetAccessToken(Aws::String&& value) { m_accessTokenHasBeenSet = true; m_accessToken = std::move(value); } 156 157 /** 158 * <p>The token issued by the <code>CreateToken</code> API call. For more 159 * information, see <a 160 * href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> 161 * in the <i>AWS SSO OIDC API Reference Guide</i>.</p> 162 */ SetAccessToken(const char * value)163 inline void SetAccessToken(const char* value) { m_accessTokenHasBeenSet = true; m_accessToken.assign(value); } 164 165 /** 166 * <p>The token issued by the <code>CreateToken</code> API call. For more 167 * information, see <a 168 * href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> 169 * in the <i>AWS SSO OIDC API Reference Guide</i>.</p> 170 */ WithAccessToken(const Aws::String & value)171 inline GetRoleCredentialsRequest& WithAccessToken(const Aws::String& value) { SetAccessToken(value); return *this;} 172 173 /** 174 * <p>The token issued by the <code>CreateToken</code> API call. For more 175 * information, see <a 176 * href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> 177 * in the <i>AWS SSO OIDC API Reference Guide</i>.</p> 178 */ WithAccessToken(Aws::String && value)179 inline GetRoleCredentialsRequest& WithAccessToken(Aws::String&& value) { SetAccessToken(std::move(value)); return *this;} 180 181 /** 182 * <p>The token issued by the <code>CreateToken</code> API call. For more 183 * information, see <a 184 * href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> 185 * in the <i>AWS SSO OIDC API Reference Guide</i>.</p> 186 */ WithAccessToken(const char * value)187 inline GetRoleCredentialsRequest& WithAccessToken(const char* value) { SetAccessToken(value); return *this;} 188 189 private: 190 191 Aws::String m_roleName; 192 bool m_roleNameHasBeenSet; 193 194 Aws::String m_accountId; 195 bool m_accountIdHasBeenSet; 196 197 Aws::String m_accessToken; 198 bool m_accessTokenHasBeenSet; 199 }; 200 201 } // namespace Model 202 } // namespace SSO 203 } // namespace Aws 204