AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
PutPolicyRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/fms/FMSRequest.h>
9#include <aws/fms/FMS_EXPORTS.h>
10#include <aws/fms/model/Policy.h>
11#include <aws/fms/model/Tag.h>
12
13#include <utility>
14
15namespace Aws {
16namespace FMS {
17namespace Model {
18
22 public:
23 AWS_FMS_API PutPolicyRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "PutPolicy"; }
30
31 AWS_FMS_API Aws::String SerializePayload() const override;
32
34
36
39 inline const Policy& GetPolicy() const { return m_policy; }
40 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
41 template <typename PolicyT = Policy>
42 void SetPolicy(PolicyT&& value) {
43 m_policyHasBeenSet = true;
44 m_policy = std::forward<PolicyT>(value);
45 }
46 template <typename PolicyT = Policy>
47 PutPolicyRequest& WithPolicy(PolicyT&& value) {
48 SetPolicy(std::forward<PolicyT>(value));
49 return *this;
50 }
52
54
57 inline const Aws::Vector<Tag>& GetTagList() const { return m_tagList; }
58 inline bool TagListHasBeenSet() const { return m_tagListHasBeenSet; }
59 template <typename TagListT = Aws::Vector<Tag>>
60 void SetTagList(TagListT&& value) {
61 m_tagListHasBeenSet = true;
62 m_tagList = std::forward<TagListT>(value);
63 }
64 template <typename TagListT = Aws::Vector<Tag>>
65 PutPolicyRequest& WithTagList(TagListT&& value) {
66 SetTagList(std::forward<TagListT>(value));
67 return *this;
68 }
69 template <typename TagListT = Tag>
70 PutPolicyRequest& AddTagList(TagListT&& value) {
71 m_tagListHasBeenSet = true;
72 m_tagList.emplace_back(std::forward<TagListT>(value));
73 return *this;
74 }
76 private:
77 Policy m_policy;
78
79 Aws::Vector<Tag> m_tagList;
80 bool m_policyHasBeenSet = false;
81 bool m_tagListHasBeenSet = false;
82};
83
84} // namespace Model
85} // namespace FMS
86} // namespace Aws
PutPolicyRequest & WithPolicy(PolicyT &&value)
virtual const char * GetServiceRequestName() const override
PutPolicyRequest & WithTagList(TagListT &&value)
const Aws::Vector< Tag > & GetTagList() const
void SetTagList(TagListT &&value)
AWS_FMS_API Aws::String SerializePayload() const override
AWS_FMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_FMS_API PutPolicyRequest()=default
PutPolicyRequest & AddTagList(TagListT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector