AWS SDK for C++

AWS SDK for C++ Version 1.11.943

Loading...
Searching...
No Matches
PutResourcePolicyRequest.h
1
6#pragma once
7#include <aws/context/ContextRequest.h>
8#include <aws/context/Context_EXPORTS.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Context {
15namespace Model {
16
20 public:
21 AWS_CONTEXT_API PutResourcePolicyRequest() = default;
22
23 // Service request name is the Operation name which will send this request out,
24 // each operation should has unique request name, so that we can get operation's name from this request.
25 // Note: this is not true for response, multiple operations may have the same response name,
26 // so we can not get operation's name from response.
27 inline virtual const char* GetServiceRequestName() const override { return "PutResourcePolicy"; }
28
29 AWS_CONTEXT_API Aws::String SerializePayload() const override;
30
32
34
37 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
38 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
39 template <typename ResourceArnT = Aws::String>
40 void SetResourceArn(ResourceArnT&& value) {
41 m_resourceArnHasBeenSet = true;
42 m_resourceArn = std::forward<ResourceArnT>(value);
43 }
44 template <typename ResourceArnT = Aws::String>
46 SetResourceArn(std::forward<ResourceArnT>(value));
47 return *this;
48 }
50
52
55 inline const Aws::String& GetPolicy() const { return m_policy; }
56 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
57 template <typename PolicyT = Aws::String>
58 void SetPolicy(PolicyT&& value) {
59 m_policyHasBeenSet = true;
60 m_policy = std::forward<PolicyT>(value);
61 }
62 template <typename PolicyT = Aws::String>
64 SetPolicy(std::forward<PolicyT>(value));
65 return *this;
66 }
68
70
74 inline const Aws::String& GetExpectedRevisionId() const { return m_expectedRevisionId; }
75 inline bool ExpectedRevisionIdHasBeenSet() const { return m_expectedRevisionIdHasBeenSet; }
76 template <typename ExpectedRevisionIdT = Aws::String>
77 void SetExpectedRevisionId(ExpectedRevisionIdT&& value) {
78 m_expectedRevisionIdHasBeenSet = true;
79 m_expectedRevisionId = std::forward<ExpectedRevisionIdT>(value);
80 }
81 template <typename ExpectedRevisionIdT = Aws::String>
82 PutResourcePolicyRequest& WithExpectedRevisionId(ExpectedRevisionIdT&& value) {
83 SetExpectedRevisionId(std::forward<ExpectedRevisionIdT>(value));
84 return *this;
85 }
87 private:
88 Aws::String m_resourceArn;
89
90 Aws::String m_policy;
91
92 Aws::String m_expectedRevisionId;
93 bool m_resourceArnHasBeenSet = false;
94 bool m_policyHasBeenSet = false;
95 bool m_expectedRevisionIdHasBeenSet = false;
96};
97
98} // namespace Model
99} // namespace Context
100} // namespace Aws
AWS_CONTEXT_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
PutResourcePolicyRequest & WithExpectedRevisionId(ExpectedRevisionIdT &&value)
PutResourcePolicyRequest & WithPolicy(PolicyT &&value)
void SetExpectedRevisionId(ExpectedRevisionIdT &&value)
AWS_CONTEXT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutResourcePolicyRequest & WithResourceArn(ResourceArnT &&value)
AWS_CONTEXT_API PutResourcePolicyRequest()=default
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String