AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreatePolicyRequest.h
1
6#pragma once
7#include <aws/iot/IoT_EXPORTS.h>
8#include <aws/iot/IoTRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/iot/model/Tag.h>
12#include <utility>
13
14namespace Aws
15{
16namespace IoT
17{
18namespace Model
19{
20
27 {
28 public:
29 AWS_IOT_API CreatePolicyRequest() = default;
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_IOT_API Aws::String SerializePayload() const override;
38
39
41
44 inline const Aws::String& GetPolicyName() const { return m_policyName; }
45 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
46 template<typename PolicyNameT = Aws::String>
47 void SetPolicyName(PolicyNameT&& value) { m_policyNameHasBeenSet = true; m_policyName = std::forward<PolicyNameT>(value); }
48 template<typename PolicyNameT = Aws::String>
49 CreatePolicyRequest& WithPolicyName(PolicyNameT&& value) { SetPolicyName(std::forward<PolicyNameT>(value)); return *this;}
51
53
57 inline const Aws::String& GetPolicyDocument() const { return m_policyDocument; }
58 inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; }
59 template<typename PolicyDocumentT = Aws::String>
60 void SetPolicyDocument(PolicyDocumentT&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::forward<PolicyDocumentT>(value); }
61 template<typename PolicyDocumentT = Aws::String>
62 CreatePolicyRequest& WithPolicyDocument(PolicyDocumentT&& value) { SetPolicyDocument(std::forward<PolicyDocumentT>(value)); return *this;}
64
66
73 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
74 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
75 template<typename TagsT = Aws::Vector<Tag>>
76 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
77 template<typename TagsT = Aws::Vector<Tag>>
78 CreatePolicyRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
79 template<typename TagsT = Tag>
80 CreatePolicyRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
82 private:
83
84 Aws::String m_policyName;
85 bool m_policyNameHasBeenSet = false;
86
87 Aws::String m_policyDocument;
88 bool m_policyDocumentHasBeenSet = false;
89
90 Aws::Vector<Tag> m_tags;
91 bool m_tagsHasBeenSet = false;
92 };
93
94} // namespace Model
95} // namespace IoT
96} // namespace Aws
CreatePolicyRequest & AddTags(TagsT &&value)
const Aws::String & GetPolicyName() const
CreatePolicyRequest & WithTags(TagsT &&value)
CreatePolicyRequest & WithPolicyDocument(PolicyDocumentT &&value)
void SetPolicyName(PolicyNameT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::Vector< Tag > & GetTags() const
AWS_IOT_API CreatePolicyRequest()=default
const Aws::String & GetPolicyDocument() const
CreatePolicyRequest & WithPolicyName(PolicyNameT &&value)
void SetPolicyDocument(PolicyDocumentT &&value)
AWS_IOT_API Aws::String SerializePayload() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector