AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
GetOAuthTokenRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/credentialbroker/CredentialBrokerRequest.h>
11#include <aws/credentialbroker/CredentialBroker_EXPORTS.h>
12#include <aws/credentialbroker/model/GrantType.h>
13
14#include <utility>
15
16namespace Aws {
17namespace CredentialBroker {
18namespace Model {
19
23 public:
24 AWS_CREDENTIALBROKER_API GetOAuthTokenRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "GetOAuthToken"; }
31
32 AWS_CREDENTIALBROKER_API Aws::String SerializePayload() const override;
33
35
39 inline const Aws::String& GetCredentialProviderArn() const { return m_credentialProviderArn; }
40 inline bool CredentialProviderArnHasBeenSet() const { return m_credentialProviderArnHasBeenSet; }
41 template <typename CredentialProviderArnT = Aws::String>
42 void SetCredentialProviderArn(CredentialProviderArnT&& value) {
43 m_credentialProviderArnHasBeenSet = true;
44 m_credentialProviderArn = std::forward<CredentialProviderArnT>(value);
45 }
46 template <typename CredentialProviderArnT = Aws::String>
47 GetOAuthTokenRequest& WithCredentialProviderArn(CredentialProviderArnT&& value) {
48 SetCredentialProviderArn(std::forward<CredentialProviderArnT>(value));
49 return *this;
50 }
52
54
58 inline GrantType GetGrantType() const { return m_grantType; }
59 inline bool GrantTypeHasBeenSet() const { return m_grantTypeHasBeenSet; }
60 inline void SetGrantType(GrantType value) {
61 m_grantTypeHasBeenSet = true;
62 m_grantType = value;
63 }
65 SetGrantType(value);
66 return *this;
67 }
69
71
74 inline const Aws::Vector<Aws::String>& GetScopes() const { return m_scopes; }
75 inline bool ScopesHasBeenSet() const { return m_scopesHasBeenSet; }
76 template <typename ScopesT = Aws::Vector<Aws::String>>
77 void SetScopes(ScopesT&& value) {
78 m_scopesHasBeenSet = true;
79 m_scopes = std::forward<ScopesT>(value);
80 }
81 template <typename ScopesT = Aws::Vector<Aws::String>>
82 GetOAuthTokenRequest& WithScopes(ScopesT&& value) {
83 SetScopes(std::forward<ScopesT>(value));
84 return *this;
85 }
86 template <typename ScopesT = Aws::String>
87 GetOAuthTokenRequest& AddScopes(ScopesT&& value) {
88 m_scopesHasBeenSet = true;
89 m_scopes.emplace_back(std::forward<ScopesT>(value));
90 return *this;
91 }
93
95
99 inline const Aws::Vector<Aws::String>& GetResources() const { return m_resources; }
100 inline bool ResourcesHasBeenSet() const { return m_resourcesHasBeenSet; }
101 template <typename ResourcesT = Aws::Vector<Aws::String>>
102 void SetResources(ResourcesT&& value) {
103 m_resourcesHasBeenSet = true;
104 m_resources = std::forward<ResourcesT>(value);
105 }
106 template <typename ResourcesT = Aws::Vector<Aws::String>>
107 GetOAuthTokenRequest& WithResources(ResourcesT&& value) {
108 SetResources(std::forward<ResourcesT>(value));
109 return *this;
110 }
111 template <typename ResourcesT = Aws::String>
112 GetOAuthTokenRequest& AddResources(ResourcesT&& value) {
113 m_resourcesHasBeenSet = true;
114 m_resources.emplace_back(std::forward<ResourcesT>(value));
115 return *this;
116 }
118
120
124 inline const Aws::Vector<Aws::String>& GetAudiences() const { return m_audiences; }
125 inline bool AudiencesHasBeenSet() const { return m_audiencesHasBeenSet; }
126 template <typename AudiencesT = Aws::Vector<Aws::String>>
127 void SetAudiences(AudiencesT&& value) {
128 m_audiencesHasBeenSet = true;
129 m_audiences = std::forward<AudiencesT>(value);
130 }
131 template <typename AudiencesT = Aws::Vector<Aws::String>>
132 GetOAuthTokenRequest& WithAudiences(AudiencesT&& value) {
133 SetAudiences(std::forward<AudiencesT>(value));
134 return *this;
135 }
136 template <typename AudiencesT = Aws::String>
137 GetOAuthTokenRequest& AddAudiences(AudiencesT&& value) {
138 m_audiencesHasBeenSet = true;
139 m_audiences.emplace_back(std::forward<AudiencesT>(value));
140 return *this;
141 }
143
145
150 inline const Aws::Map<Aws::String, Aws::String>& GetCustomParameters() const { return m_customParameters; }
151 inline bool CustomParametersHasBeenSet() const { return m_customParametersHasBeenSet; }
152 template <typename CustomParametersT = Aws::Map<Aws::String, Aws::String>>
153 void SetCustomParameters(CustomParametersT&& value) {
154 m_customParametersHasBeenSet = true;
155 m_customParameters = std::forward<CustomParametersT>(value);
156 }
157 template <typename CustomParametersT = Aws::Map<Aws::String, Aws::String>>
158 GetOAuthTokenRequest& WithCustomParameters(CustomParametersT&& value) {
159 SetCustomParameters(std::forward<CustomParametersT>(value));
160 return *this;
161 }
162 template <typename CustomParametersKeyT = Aws::String, typename CustomParametersValueT = Aws::String>
163 GetOAuthTokenRequest& AddCustomParameters(CustomParametersKeyT&& key, CustomParametersValueT&& value) {
164 m_customParametersHasBeenSet = true;
165 m_customParameters.emplace(std::forward<CustomParametersKeyT>(key), std::forward<CustomParametersValueT>(value));
166 return *this;
167 }
169
171
176 inline bool GetForceAuthentication() const { return m_forceAuthentication; }
177 inline bool ForceAuthenticationHasBeenSet() const { return m_forceAuthenticationHasBeenSet; }
178 inline void SetForceAuthentication(bool value) {
179 m_forceAuthenticationHasBeenSet = true;
180 m_forceAuthentication = value;
181 }
184 return *this;
185 }
187
189
193 inline const Aws::String& GetSessionUri() const { return m_sessionUri; }
194 inline bool SessionUriHasBeenSet() const { return m_sessionUriHasBeenSet; }
195 template <typename SessionUriT = Aws::String>
196 void SetSessionUri(SessionUriT&& value) {
197 m_sessionUriHasBeenSet = true;
198 m_sessionUri = std::forward<SessionUriT>(value);
199 }
200 template <typename SessionUriT = Aws::String>
201 GetOAuthTokenRequest& WithSessionUri(SessionUriT&& value) {
202 SetSessionUri(std::forward<SessionUriT>(value));
203 return *this;
204 }
206 private:
207 Aws::String m_credentialProviderArn;
208
209 GrantType m_grantType{GrantType::NOT_SET};
210
212
213 Aws::Vector<Aws::String> m_resources;
214
215 Aws::Vector<Aws::String> m_audiences;
216
217 Aws::Map<Aws::String, Aws::String> m_customParameters;
218
219 bool m_forceAuthentication{false};
220
221 Aws::String m_sessionUri;
222 bool m_credentialProviderArnHasBeenSet = false;
223 bool m_grantTypeHasBeenSet = false;
224 bool m_scopesHasBeenSet = false;
225 bool m_resourcesHasBeenSet = false;
226 bool m_audiencesHasBeenSet = false;
227 bool m_customParametersHasBeenSet = false;
228 bool m_forceAuthenticationHasBeenSet = false;
229 bool m_sessionUriHasBeenSet = false;
230};
231
232} // namespace Model
233} // namespace CredentialBroker
234} // namespace Aws
const Aws::Vector< Aws::String > & GetAudiences() const
GetOAuthTokenRequest & WithForceAuthentication(bool value)
virtual const char * GetServiceRequestName() const override
AWS_CREDENTIALBROKER_API GetOAuthTokenRequest()=default
GetOAuthTokenRequest & AddCustomParameters(CustomParametersKeyT &&key, CustomParametersValueT &&value)
GetOAuthTokenRequest & AddResources(ResourcesT &&value)
GetOAuthTokenRequest & AddScopes(ScopesT &&value)
GetOAuthTokenRequest & WithResources(ResourcesT &&value)
GetOAuthTokenRequest & WithGrantType(GrantType value)
GetOAuthTokenRequest & WithSessionUri(SessionUriT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomParameters() const
GetOAuthTokenRequest & WithCustomParameters(CustomParametersT &&value)
GetOAuthTokenRequest & WithAudiences(AudiencesT &&value)
const Aws::Vector< Aws::String > & GetResources() const
const Aws::Vector< Aws::String > & GetScopes() const
GetOAuthTokenRequest & AddAudiences(AudiencesT &&value)
void SetCredentialProviderArn(CredentialProviderArnT &&value)
GetOAuthTokenRequest & WithScopes(ScopesT &&value)
GetOAuthTokenRequest & WithCredentialProviderArn(CredentialProviderArnT &&value)
AWS_CREDENTIALBROKER_API Aws::String SerializePayload() const override
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector