AWS SDK for C++  1.9.108
AWS SDK for C++
CreatePolicyRequest.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/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace IoT
17 {
18 namespace Model
19 {
20 
27  {
28  public:
30 
31  // Service request name is the Operation name which will send this request out,
32  // each operation should has unique request name, so that we can get operation's name from this request.
33  // Note: this is not true for response, multiple operations may have the same response name,
34  // so we can not get operation's name from response.
35  inline virtual const char* GetServiceRequestName() const override { return "CreatePolicy"; }
36 
37  Aws::String SerializePayload() const override;
38 
39 
43  inline const Aws::String& GetPolicyName() const{ return m_policyName; }
44 
48  inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
49 
53  inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
54 
58  inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
59 
63  inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
64 
68  inline CreatePolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
69 
73  inline CreatePolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
74 
78  inline CreatePolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
79 
80 
85  inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; }
86 
91  inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; }
92 
97  inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; }
98 
103  inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); }
104 
109  inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); }
110 
115  inline CreatePolicyRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;}
116 
121  inline CreatePolicyRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;}
122 
127  inline CreatePolicyRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;}
128 
129 
137  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
138 
146  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
147 
155  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
156 
164  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
165 
173  inline CreatePolicyRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
174 
182  inline CreatePolicyRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
183 
191  inline CreatePolicyRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
192 
200  inline CreatePolicyRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
201 
202  private:
203 
204  Aws::String m_policyName;
205  bool m_policyNameHasBeenSet;
206 
207  Aws::String m_policyDocument;
208  bool m_policyDocumentHasBeenSet;
209 
210  Aws::Vector<Tag> m_tags;
211  bool m_tagsHasBeenSet;
212  };
213 
214 } // namespace Model
215 } // namespace IoT
216 } // namespace Aws
Aws::IoT::Model::CreatePolicyRequest::CreatePolicyRequest
CreatePolicyRequest()
Aws::IoT::Model::CreatePolicyRequest::GetPolicyDocument
const Aws::String & GetPolicyDocument() const
Definition: CreatePolicyRequest.h:85
Aws::IoT::Model::CreatePolicyRequest::WithPolicyDocument
CreatePolicyRequest & WithPolicyDocument(const char *value)
Definition: CreatePolicyRequest.h:127
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::IoT::Model::CreatePolicyRequest::WithPolicyName
CreatePolicyRequest & WithPolicyName(const Aws::String &value)
Definition: CreatePolicyRequest.h:68
Aws::IoT::Model::CreatePolicyRequest::SetPolicyName
void SetPolicyName(const char *value)
Definition: CreatePolicyRequest.h:63
AWSVector.h
Aws::IoT::Model::CreatePolicyRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: CreatePolicyRequest.h:155
Aws::IoT::Model::CreatePolicyRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::IoT::Model::CreatePolicyRequest::PolicyNameHasBeenSet
bool PolicyNameHasBeenSet() const
Definition: CreatePolicyRequest.h:48
Aws::IoT::Model::CreatePolicyRequest::SetPolicyName
void SetPolicyName(const Aws::String &value)
Definition: CreatePolicyRequest.h:53
Aws::IoT::Model::Tag
Definition: Tag.h:33
Aws::IoT::Model::CreatePolicyRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: CreatePolicyRequest.h:146
Aws::IoT::Model::CreatePolicyRequest::SetPolicyName
void SetPolicyName(Aws::String &&value)
Definition: CreatePolicyRequest.h:58
Aws::IoT::Model::CreatePolicyRequest
Definition: CreatePolicyRequest.h:27
Aws::IoT::Model::CreatePolicyRequest::WithPolicyName
CreatePolicyRequest & WithPolicyName(const char *value)
Definition: CreatePolicyRequest.h:78
Aws::IoT::Model::CreatePolicyRequest::WithPolicyName
CreatePolicyRequest & WithPolicyName(Aws::String &&value)
Definition: CreatePolicyRequest.h:73
Aws::IoT::Model::CreatePolicyRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: CreatePolicyRequest.h:137
AWSString.h
Aws::IoT::Model::CreatePolicyRequest::PolicyDocumentHasBeenSet
bool PolicyDocumentHasBeenSet() const
Definition: CreatePolicyRequest.h:91
Aws::IoT::Model::CreatePolicyRequest::SetPolicyDocument
void SetPolicyDocument(Aws::String &&value)
Definition: CreatePolicyRequest.h:103
Aws::IoT::IoTRequest
Definition: IoTRequest.h:17
Aws::IoT::Model::CreatePolicyRequest::WithPolicyDocument
CreatePolicyRequest & WithPolicyDocument(const Aws::String &value)
Definition: CreatePolicyRequest.h:115
Aws::IoT::Model::CreatePolicyRequest::SetPolicyDocument
void SetPolicyDocument(const char *value)
Definition: CreatePolicyRequest.h:109
Aws::IoT::Model::CreatePolicyRequest::AddTags
CreatePolicyRequest & AddTags(Tag &&value)
Definition: CreatePolicyRequest.h:200
Aws
Definition: AccessManagementClient.h:15
Aws::IoT::Model::CreatePolicyRequest::WithTags
CreatePolicyRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: CreatePolicyRequest.h:182
Aws::IoT::Model::CreatePolicyRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreatePolicyRequest.h:35
AWS_IOT_API
#define AWS_IOT_API
Definition: IoT_EXPORTS.h:28
Aws::IoT::Model::CreatePolicyRequest::SetPolicyDocument
void SetPolicyDocument(const Aws::String &value)
Definition: CreatePolicyRequest.h:97
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::IoT::Model::CreatePolicyRequest::WithTags
CreatePolicyRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: CreatePolicyRequest.h:173
Aws::IoT::Model::CreatePolicyRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: CreatePolicyRequest.h:164
IoTRequest.h
Aws::IoT::Model::CreatePolicyRequest::WithPolicyDocument
CreatePolicyRequest & WithPolicyDocument(Aws::String &&value)
Definition: CreatePolicyRequest.h:121
Aws::IoT::Model::CreatePolicyRequest::AddTags
CreatePolicyRequest & AddTags(const Tag &value)
Definition: CreatePolicyRequest.h:191
Aws::IoT::Model::CreatePolicyRequest::GetPolicyName
const Aws::String & GetPolicyName() const
Definition: CreatePolicyRequest.h:43
Tag.h
IoT_EXPORTS.h