AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ResourcePolicy.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/logs/CloudWatchLogs_EXPORTS.h>
9#include <aws/logs/model/PolicyScope.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace CloudWatchLogs {
21namespace Model {
22
30 public:
31 AWS_CLOUDWATCHLOGS_API ResourcePolicy() = default;
32 AWS_CLOUDWATCHLOGS_API ResourcePolicy(Aws::Utils::Json::JsonView jsonValue);
33 AWS_CLOUDWATCHLOGS_API ResourcePolicy& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Aws::String& GetPolicyName() const { return m_policyName; }
41 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
42 template <typename PolicyNameT = Aws::String>
43 void SetPolicyName(PolicyNameT&& value) {
44 m_policyNameHasBeenSet = true;
45 m_policyName = std::forward<PolicyNameT>(value);
46 }
47 template <typename PolicyNameT = Aws::String>
48 ResourcePolicy& WithPolicyName(PolicyNameT&& value) {
49 SetPolicyName(std::forward<PolicyNameT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::String& GetPolicyDocument() const { return m_policyDocument; }
59 inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; }
60 template <typename PolicyDocumentT = Aws::String>
61 void SetPolicyDocument(PolicyDocumentT&& value) {
62 m_policyDocumentHasBeenSet = true;
63 m_policyDocument = std::forward<PolicyDocumentT>(value);
64 }
65 template <typename PolicyDocumentT = Aws::String>
66 ResourcePolicy& WithPolicyDocument(PolicyDocumentT&& value) {
67 SetPolicyDocument(std::forward<PolicyDocumentT>(value));
68 return *this;
69 }
71
73
77 inline long long GetLastUpdatedTime() const { return m_lastUpdatedTime; }
78 inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }
79 inline void SetLastUpdatedTime(long long value) {
80 m_lastUpdatedTimeHasBeenSet = true;
81 m_lastUpdatedTime = value;
82 }
83 inline ResourcePolicy& WithLastUpdatedTime(long long value) {
84 SetLastUpdatedTime(value);
85 return *this;
86 }
88
90
94 inline PolicyScope GetPolicyScope() const { return m_policyScope; }
95 inline bool PolicyScopeHasBeenSet() const { return m_policyScopeHasBeenSet; }
96 inline void SetPolicyScope(PolicyScope value) {
97 m_policyScopeHasBeenSet = true;
98 m_policyScope = value;
99 }
101 SetPolicyScope(value);
102 return *this;
103 }
105
107
111 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
112 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
113 template <typename ResourceArnT = Aws::String>
114 void SetResourceArn(ResourceArnT&& value) {
115 m_resourceArnHasBeenSet = true;
116 m_resourceArn = std::forward<ResourceArnT>(value);
117 }
118 template <typename ResourceArnT = Aws::String>
119 ResourcePolicy& WithResourceArn(ResourceArnT&& value) {
120 SetResourceArn(std::forward<ResourceArnT>(value));
121 return *this;
122 }
124
126
130 inline const Aws::String& GetRevisionId() const { return m_revisionId; }
131 inline bool RevisionIdHasBeenSet() const { return m_revisionIdHasBeenSet; }
132 template <typename RevisionIdT = Aws::String>
133 void SetRevisionId(RevisionIdT&& value) {
134 m_revisionIdHasBeenSet = true;
135 m_revisionId = std::forward<RevisionIdT>(value);
136 }
137 template <typename RevisionIdT = Aws::String>
138 ResourcePolicy& WithRevisionId(RevisionIdT&& value) {
139 SetRevisionId(std::forward<RevisionIdT>(value));
140 return *this;
141 }
143 private:
144 Aws::String m_policyName;
145
146 Aws::String m_policyDocument;
147
148 long long m_lastUpdatedTime{0};
149
150 PolicyScope m_policyScope{PolicyScope::NOT_SET};
151
152 Aws::String m_resourceArn;
153
154 Aws::String m_revisionId;
155 bool m_policyNameHasBeenSet = false;
156 bool m_policyDocumentHasBeenSet = false;
157 bool m_lastUpdatedTimeHasBeenSet = false;
158 bool m_policyScopeHasBeenSet = false;
159 bool m_resourceArnHasBeenSet = false;
160 bool m_revisionIdHasBeenSet = false;
161};
162
163} // namespace Model
164} // namespace CloudWatchLogs
165} // namespace Aws
const Aws::String & GetPolicyName() const
AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const
ResourcePolicy & WithLastUpdatedTime(long long value)
const Aws::String & GetPolicyDocument() const
AWS_CLOUDWATCHLOGS_API ResourcePolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetRevisionId() const
ResourcePolicy & WithPolicyName(PolicyNameT &&value)
ResourcePolicy & WithPolicyScope(PolicyScope value)
AWS_CLOUDWATCHLOGS_API ResourcePolicy()=default
const Aws::String & GetResourceArn() const
void SetResourceArn(ResourceArnT &&value)
AWS_CLOUDWATCHLOGS_API ResourcePolicy(Aws::Utils::Json::JsonView jsonValue)
void SetPolicyDocument(PolicyDocumentT &&value)
ResourcePolicy & WithResourceArn(ResourceArnT &&value)
ResourcePolicy & WithRevisionId(RevisionIdT &&value)
ResourcePolicy & WithPolicyDocument(PolicyDocumentT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue