AWS SDK for C++  1.9.15
AWS SDK for C++
TestAuthorizationRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/iot/IoT_EXPORTS.h>
8 #include <aws/iot/IoTRequest.h>
11 #include <aws/iot/model/AuthInfo.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Http
17 {
18  class URI;
19 } //namespace Http
20 namespace IoT
21 {
22 namespace Model
23 {
24 
28  {
29  public:
31 
32  // Service request name is the Operation name which will send this request out,
33  // each operation should has unique request name, so that we can get operation's name from this request.
34  // Note: this is not true for response, multiple operations may have the same response name,
35  // so we can not get operation's name from response.
36  inline virtual const char* GetServiceRequestName() const override { return "TestAuthorization"; }
37 
38  Aws::String SerializePayload() const override;
39 
40  void AddQueryStringParameters(Aws::Http::URI& uri) const override;
41 
42 
50  inline const Aws::String& GetPrincipal() const{ return m_principal; }
51 
59  inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
60 
68  inline void SetPrincipal(const Aws::String& value) { m_principalHasBeenSet = true; m_principal = value; }
69 
77  inline void SetPrincipal(Aws::String&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
78 
86  inline void SetPrincipal(const char* value) { m_principalHasBeenSet = true; m_principal.assign(value); }
87 
95  inline TestAuthorizationRequest& WithPrincipal(const Aws::String& value) { SetPrincipal(value); return *this;}
96 
104  inline TestAuthorizationRequest& WithPrincipal(Aws::String&& value) { SetPrincipal(std::move(value)); return *this;}
105 
113  inline TestAuthorizationRequest& WithPrincipal(const char* value) { SetPrincipal(value); return *this;}
114 
115 
119  inline const Aws::String& GetCognitoIdentityPoolId() const{ return m_cognitoIdentityPoolId; }
120 
124  inline bool CognitoIdentityPoolIdHasBeenSet() const { return m_cognitoIdentityPoolIdHasBeenSet; }
125 
129  inline void SetCognitoIdentityPoolId(const Aws::String& value) { m_cognitoIdentityPoolIdHasBeenSet = true; m_cognitoIdentityPoolId = value; }
130 
134  inline void SetCognitoIdentityPoolId(Aws::String&& value) { m_cognitoIdentityPoolIdHasBeenSet = true; m_cognitoIdentityPoolId = std::move(value); }
135 
139  inline void SetCognitoIdentityPoolId(const char* value) { m_cognitoIdentityPoolIdHasBeenSet = true; m_cognitoIdentityPoolId.assign(value); }
140 
144  inline TestAuthorizationRequest& WithCognitoIdentityPoolId(const Aws::String& value) { SetCognitoIdentityPoolId(value); return *this;}
145 
149  inline TestAuthorizationRequest& WithCognitoIdentityPoolId(Aws::String&& value) { SetCognitoIdentityPoolId(std::move(value)); return *this;}
150 
154  inline TestAuthorizationRequest& WithCognitoIdentityPoolId(const char* value) { SetCognitoIdentityPoolId(value); return *this;}
155 
156 
161  inline const Aws::Vector<AuthInfo>& GetAuthInfos() const{ return m_authInfos; }
162 
167  inline bool AuthInfosHasBeenSet() const { return m_authInfosHasBeenSet; }
168 
173  inline void SetAuthInfos(const Aws::Vector<AuthInfo>& value) { m_authInfosHasBeenSet = true; m_authInfos = value; }
174 
179  inline void SetAuthInfos(Aws::Vector<AuthInfo>&& value) { m_authInfosHasBeenSet = true; m_authInfos = std::move(value); }
180 
185  inline TestAuthorizationRequest& WithAuthInfos(const Aws::Vector<AuthInfo>& value) { SetAuthInfos(value); return *this;}
186 
191  inline TestAuthorizationRequest& WithAuthInfos(Aws::Vector<AuthInfo>&& value) { SetAuthInfos(std::move(value)); return *this;}
192 
197  inline TestAuthorizationRequest& AddAuthInfos(const AuthInfo& value) { m_authInfosHasBeenSet = true; m_authInfos.push_back(value); return *this; }
198 
203  inline TestAuthorizationRequest& AddAuthInfos(AuthInfo&& value) { m_authInfosHasBeenSet = true; m_authInfos.push_back(std::move(value)); return *this; }
204 
205 
209  inline const Aws::String& GetClientId() const{ return m_clientId; }
210 
214  inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; }
215 
219  inline void SetClientId(const Aws::String& value) { m_clientIdHasBeenSet = true; m_clientId = value; }
220 
224  inline void SetClientId(Aws::String&& value) { m_clientIdHasBeenSet = true; m_clientId = std::move(value); }
225 
229  inline void SetClientId(const char* value) { m_clientIdHasBeenSet = true; m_clientId.assign(value); }
230 
234  inline TestAuthorizationRequest& WithClientId(const Aws::String& value) { SetClientId(value); return *this;}
235 
239  inline TestAuthorizationRequest& WithClientId(Aws::String&& value) { SetClientId(std::move(value)); return *this;}
240 
244  inline TestAuthorizationRequest& WithClientId(const char* value) { SetClientId(value); return *this;}
245 
246 
251  inline const Aws::Vector<Aws::String>& GetPolicyNamesToAdd() const{ return m_policyNamesToAdd; }
252 
257  inline bool PolicyNamesToAddHasBeenSet() const { return m_policyNamesToAddHasBeenSet; }
258 
263  inline void SetPolicyNamesToAdd(const Aws::Vector<Aws::String>& value) { m_policyNamesToAddHasBeenSet = true; m_policyNamesToAdd = value; }
264 
269  inline void SetPolicyNamesToAdd(Aws::Vector<Aws::String>&& value) { m_policyNamesToAddHasBeenSet = true; m_policyNamesToAdd = std::move(value); }
270 
275  inline TestAuthorizationRequest& WithPolicyNamesToAdd(const Aws::Vector<Aws::String>& value) { SetPolicyNamesToAdd(value); return *this;}
276 
281  inline TestAuthorizationRequest& WithPolicyNamesToAdd(Aws::Vector<Aws::String>&& value) { SetPolicyNamesToAdd(std::move(value)); return *this;}
282 
287  inline TestAuthorizationRequest& AddPolicyNamesToAdd(const Aws::String& value) { m_policyNamesToAddHasBeenSet = true; m_policyNamesToAdd.push_back(value); return *this; }
288 
293  inline TestAuthorizationRequest& AddPolicyNamesToAdd(Aws::String&& value) { m_policyNamesToAddHasBeenSet = true; m_policyNamesToAdd.push_back(std::move(value)); return *this; }
294 
299  inline TestAuthorizationRequest& AddPolicyNamesToAdd(const char* value) { m_policyNamesToAddHasBeenSet = true; m_policyNamesToAdd.push_back(value); return *this; }
300 
301 
306  inline const Aws::Vector<Aws::String>& GetPolicyNamesToSkip() const{ return m_policyNamesToSkip; }
307 
312  inline bool PolicyNamesToSkipHasBeenSet() const { return m_policyNamesToSkipHasBeenSet; }
313 
318  inline void SetPolicyNamesToSkip(const Aws::Vector<Aws::String>& value) { m_policyNamesToSkipHasBeenSet = true; m_policyNamesToSkip = value; }
319 
324  inline void SetPolicyNamesToSkip(Aws::Vector<Aws::String>&& value) { m_policyNamesToSkipHasBeenSet = true; m_policyNamesToSkip = std::move(value); }
325 
330  inline TestAuthorizationRequest& WithPolicyNamesToSkip(const Aws::Vector<Aws::String>& value) { SetPolicyNamesToSkip(value); return *this;}
331 
336  inline TestAuthorizationRequest& WithPolicyNamesToSkip(Aws::Vector<Aws::String>&& value) { SetPolicyNamesToSkip(std::move(value)); return *this;}
337 
342  inline TestAuthorizationRequest& AddPolicyNamesToSkip(const Aws::String& value) { m_policyNamesToSkipHasBeenSet = true; m_policyNamesToSkip.push_back(value); return *this; }
343 
348  inline TestAuthorizationRequest& AddPolicyNamesToSkip(Aws::String&& value) { m_policyNamesToSkipHasBeenSet = true; m_policyNamesToSkip.push_back(std::move(value)); return *this; }
349 
354  inline TestAuthorizationRequest& AddPolicyNamesToSkip(const char* value) { m_policyNamesToSkipHasBeenSet = true; m_policyNamesToSkip.push_back(value); return *this; }
355 
356  private:
357 
358  Aws::String m_principal;
359  bool m_principalHasBeenSet;
360 
361  Aws::String m_cognitoIdentityPoolId;
362  bool m_cognitoIdentityPoolIdHasBeenSet;
363 
364  Aws::Vector<AuthInfo> m_authInfos;
365  bool m_authInfosHasBeenSet;
366 
367  Aws::String m_clientId;
368  bool m_clientIdHasBeenSet;
369 
370  Aws::Vector<Aws::String> m_policyNamesToAdd;
371  bool m_policyNamesToAddHasBeenSet;
372 
373  Aws::Vector<Aws::String> m_policyNamesToSkip;
374  bool m_policyNamesToSkipHasBeenSet;
375  };
376 
377 } // namespace Model
378 } // namespace IoT
379 } // namespace Aws
Aws::IoT::Model::TestAuthorizationRequest::SetCognitoIdentityPoolId
void SetCognitoIdentityPoolId(Aws::String &&value)
Definition: TestAuthorizationRequest.h:134
Aws::IoT::Model::TestAuthorizationRequest::TestAuthorizationRequest
TestAuthorizationRequest()
Aws::IoT::Model::TestAuthorizationRequest::GetAuthInfos
const Aws::Vector< AuthInfo > & GetAuthInfos() const
Definition: TestAuthorizationRequest.h:161
Aws::IoT::Model::TestAuthorizationRequest::WithPolicyNamesToAdd
TestAuthorizationRequest & WithPolicyNamesToAdd(Aws::Vector< Aws::String > &&value)
Definition: TestAuthorizationRequest.h:281
Aws::Http::URI
Definition: URI.h:32
Aws::IoT::Model::TestAuthorizationRequest::SetCognitoIdentityPoolId
void SetCognitoIdentityPoolId(const Aws::String &value)
Definition: TestAuthorizationRequest.h:129
Aws::IoT::Model::TestAuthorizationRequest::WithPrincipal
TestAuthorizationRequest & WithPrincipal(const Aws::String &value)
Definition: TestAuthorizationRequest.h:95
Aws::IoT::Model::TestAuthorizationRequest::PrincipalHasBeenSet
bool PrincipalHasBeenSet() const
Definition: TestAuthorizationRequest.h:59
Aws::IoT::Model::TestAuthorizationRequest::SetPrincipal
void SetPrincipal(const char *value)
Definition: TestAuthorizationRequest.h:86
Aws::IoT::Model::TestAuthorizationRequest::WithAuthInfos
TestAuthorizationRequest & WithAuthInfos(const Aws::Vector< AuthInfo > &value)
Definition: TestAuthorizationRequest.h:185
Aws::IoT::Model::TestAuthorizationRequest::AuthInfosHasBeenSet
bool AuthInfosHasBeenSet() const
Definition: TestAuthorizationRequest.h:167
Aws::IoT::Model::TestAuthorizationRequest::SetPrincipal
void SetPrincipal(Aws::String &&value)
Definition: TestAuthorizationRequest.h:77
Aws::IoT::Model::TestAuthorizationRequest::AddPolicyNamesToAdd
TestAuthorizationRequest & AddPolicyNamesToAdd(const char *value)
Definition: TestAuthorizationRequest.h:299
Aws::IoT::Model::TestAuthorizationRequest::GetPolicyNamesToSkip
const Aws::Vector< Aws::String > & GetPolicyNamesToSkip() const
Definition: TestAuthorizationRequest.h:306
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::IoT::Model::TestAuthorizationRequest::SetPrincipal
void SetPrincipal(const Aws::String &value)
Definition: TestAuthorizationRequest.h:68
Aws::IoT::Model::TestAuthorizationRequest::AddPolicyNamesToAdd
TestAuthorizationRequest & AddPolicyNamesToAdd(Aws::String &&value)
Definition: TestAuthorizationRequest.h:293
AWSVector.h
Aws::IoT::Model::TestAuthorizationRequest::WithCognitoIdentityPoolId
TestAuthorizationRequest & WithCognitoIdentityPoolId(const Aws::String &value)
Definition: TestAuthorizationRequest.h:144
Aws::IoT::Model::TestAuthorizationRequest::SetClientId
void SetClientId(const Aws::String &value)
Definition: TestAuthorizationRequest.h:219
Aws::IoT::Model::TestAuthorizationRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TestAuthorizationRequest.h:36
Aws::IoT::Model::TestAuthorizationRequest::WithClientId
TestAuthorizationRequest & WithClientId(const char *value)
Definition: TestAuthorizationRequest.h:244
Aws::IoT::Model::TestAuthorizationRequest::SetClientId
void SetClientId(Aws::String &&value)
Definition: TestAuthorizationRequest.h:224
Aws::IoT::Model::AuthInfo
Definition: AuthInfo.h:34
Aws::IoT::Model::TestAuthorizationRequest::WithCognitoIdentityPoolId
TestAuthorizationRequest & WithCognitoIdentityPoolId(const char *value)
Definition: TestAuthorizationRequest.h:154
Aws::IoT::Model::TestAuthorizationRequest::GetClientId
const Aws::String & GetClientId() const
Definition: TestAuthorizationRequest.h:209
Aws::IoT::Model::TestAuthorizationRequest::AddPolicyNamesToSkip
TestAuthorizationRequest & AddPolicyNamesToSkip(const Aws::String &value)
Definition: TestAuthorizationRequest.h:342
Aws::IoT::Model::TestAuthorizationRequest::WithPrincipal
TestAuthorizationRequest & WithPrincipal(Aws::String &&value)
Definition: TestAuthorizationRequest.h:104
Aws::IoT::Model::TestAuthorizationRequest::ClientIdHasBeenSet
bool ClientIdHasBeenSet() const
Definition: TestAuthorizationRequest.h:214
Aws::IoT::Model::TestAuthorizationRequest::GetCognitoIdentityPoolId
const Aws::String & GetCognitoIdentityPoolId() const
Definition: TestAuthorizationRequest.h:119
Aws::IoT::Model::TestAuthorizationRequest::PolicyNamesToSkipHasBeenSet
bool PolicyNamesToSkipHasBeenSet() const
Definition: TestAuthorizationRequest.h:312
Aws::IoT::Model::TestAuthorizationRequest::AddPolicyNamesToSkip
TestAuthorizationRequest & AddPolicyNamesToSkip(const char *value)
Definition: TestAuthorizationRequest.h:354
Aws::IoT::Model::TestAuthorizationRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::IoT::Model::TestAuthorizationRequest::AddQueryStringParameters
void AddQueryStringParameters(Aws::Http::URI &uri) const override
Aws::IoT::Model::TestAuthorizationRequest::WithClientId
TestAuthorizationRequest & WithClientId(Aws::String &&value)
Definition: TestAuthorizationRequest.h:239
Aws::IoT::Model::TestAuthorizationRequest::CognitoIdentityPoolIdHasBeenSet
bool CognitoIdentityPoolIdHasBeenSet() const
Definition: TestAuthorizationRequest.h:124
Aws::IoT::Model::TestAuthorizationRequest::WithPolicyNamesToAdd
TestAuthorizationRequest & WithPolicyNamesToAdd(const Aws::Vector< Aws::String > &value)
Definition: TestAuthorizationRequest.h:275
Aws::IoT::Model::TestAuthorizationRequest::AddAuthInfos
TestAuthorizationRequest & AddAuthInfos(AuthInfo &&value)
Definition: TestAuthorizationRequest.h:203
AWSString.h
Aws::IoT::Model::TestAuthorizationRequest::SetClientId
void SetClientId(const char *value)
Definition: TestAuthorizationRequest.h:229
Aws::IoT::IoTRequest
Definition: IoTRequest.h:17
Aws::IoT::Model::TestAuthorizationRequest::WithAuthInfos
TestAuthorizationRequest & WithAuthInfos(Aws::Vector< AuthInfo > &&value)
Definition: TestAuthorizationRequest.h:191
Aws::IoT::Model::TestAuthorizationRequest::AddPolicyNamesToAdd
TestAuthorizationRequest & AddPolicyNamesToAdd(const Aws::String &value)
Definition: TestAuthorizationRequest.h:287
Aws::IoT::Model::TestAuthorizationRequest::SetPolicyNamesToSkip
void SetPolicyNamesToSkip(Aws::Vector< Aws::String > &&value)
Definition: TestAuthorizationRequest.h:324
Aws::IoT::Model::TestAuthorizationRequest::SetPolicyNamesToSkip
void SetPolicyNamesToSkip(const Aws::Vector< Aws::String > &value)
Definition: TestAuthorizationRequest.h:318
Aws::IoT::Model::TestAuthorizationRequest::SetCognitoIdentityPoolId
void SetCognitoIdentityPoolId(const char *value)
Definition: TestAuthorizationRequest.h:139
Aws::IoT::Model::TestAuthorizationRequest::WithClientId
TestAuthorizationRequest & WithClientId(const Aws::String &value)
Definition: TestAuthorizationRequest.h:234
Aws::IoT::Model::TestAuthorizationRequest::AddPolicyNamesToSkip
TestAuthorizationRequest & AddPolicyNamesToSkip(Aws::String &&value)
Definition: TestAuthorizationRequest.h:348
Aws::IoT::Model::TestAuthorizationRequest::WithPrincipal
TestAuthorizationRequest & WithPrincipal(const char *value)
Definition: TestAuthorizationRequest.h:113
Aws::IoT::Model::TestAuthorizationRequest::SetPolicyNamesToAdd
void SetPolicyNamesToAdd(Aws::Vector< Aws::String > &&value)
Definition: TestAuthorizationRequest.h:269
Aws::IoT::Model::TestAuthorizationRequest::GetPrincipal
const Aws::String & GetPrincipal() const
Definition: TestAuthorizationRequest.h:50
Aws
Definition: AccessManagementClient.h:15
Aws::IoT::Model::TestAuthorizationRequest::GetPolicyNamesToAdd
const Aws::Vector< Aws::String > & GetPolicyNamesToAdd() const
Definition: TestAuthorizationRequest.h:251
Aws::IoT::Model::TestAuthorizationRequest::SetAuthInfos
void SetAuthInfos(Aws::Vector< AuthInfo > &&value)
Definition: TestAuthorizationRequest.h:179
Aws::IoT::Model::TestAuthorizationRequest
Definition: TestAuthorizationRequest.h:28
Aws::IoT::Model::TestAuthorizationRequest::SetPolicyNamesToAdd
void SetPolicyNamesToAdd(const Aws::Vector< Aws::String > &value)
Definition: TestAuthorizationRequest.h:263
AWS_IOT_API
#define AWS_IOT_API
Definition: IoT_EXPORTS.h:28
Aws::IoT::Model::TestAuthorizationRequest::PolicyNamesToAddHasBeenSet
bool PolicyNamesToAddHasBeenSet() const
Definition: TestAuthorizationRequest.h:257
Aws::IoT::Model::TestAuthorizationRequest::WithPolicyNamesToSkip
TestAuthorizationRequest & WithPolicyNamesToSkip(const Aws::Vector< Aws::String > &value)
Definition: TestAuthorizationRequest.h:330
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::IoT::Model::TestAuthorizationRequest::WithCognitoIdentityPoolId
TestAuthorizationRequest & WithCognitoIdentityPoolId(Aws::String &&value)
Definition: TestAuthorizationRequest.h:149
Aws::IoT::Model::TestAuthorizationRequest::SetAuthInfos
void SetAuthInfos(const Aws::Vector< AuthInfo > &value)
Definition: TestAuthorizationRequest.h:173
IoTRequest.h
AuthInfo.h
Aws::IoT::Model::TestAuthorizationRequest::WithPolicyNamesToSkip
TestAuthorizationRequest & WithPolicyNamesToSkip(Aws::Vector< Aws::String > &&value)
Definition: TestAuthorizationRequest.h:336
IoT_EXPORTS.h
Aws::IoT::Model::TestAuthorizationRequest::AddAuthInfos
TestAuthorizationRequest & AddAuthInfos(const AuthInfo &value)
Definition: TestAuthorizationRequest.h:197