AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
ResourcePolicy.h
1
6#pragma once
7#include <aws/logs/CloudWatchLogs_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/logs/model/PolicyScope.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace CloudWatchLogs
23{
24namespace Model
25{
26
34 {
35 public:
36 AWS_CLOUDWATCHLOGS_API ResourcePolicy() = default;
37 AWS_CLOUDWATCHLOGS_API ResourcePolicy(Aws::Utils::Json::JsonView jsonValue);
38 AWS_CLOUDWATCHLOGS_API ResourcePolicy& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_CLOUDWATCHLOGS_API Aws::Utils::Json::JsonValue Jsonize() const;
40
41
43
46 inline const Aws::String& GetPolicyName() const { return m_policyName; }
47 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
48 template<typename PolicyNameT = Aws::String>
49 void SetPolicyName(PolicyNameT&& value) { m_policyNameHasBeenSet = true; m_policyName = std::forward<PolicyNameT>(value); }
50 template<typename PolicyNameT = Aws::String>
51 ResourcePolicy& WithPolicyName(PolicyNameT&& value) { SetPolicyName(std::forward<PolicyNameT>(value)); return *this;}
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) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::forward<PolicyDocumentT>(value); }
62 template<typename PolicyDocumentT = Aws::String>
63 ResourcePolicy& WithPolicyDocument(PolicyDocumentT&& value) { SetPolicyDocument(std::forward<PolicyDocumentT>(value)); return *this;}
65
67
71 inline long long GetLastUpdatedTime() const { return m_lastUpdatedTime; }
72 inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }
73 inline void SetLastUpdatedTime(long long value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = value; }
74 inline ResourcePolicy& WithLastUpdatedTime(long long value) { SetLastUpdatedTime(value); return *this;}
76
78
82 inline PolicyScope GetPolicyScope() const { return m_policyScope; }
83 inline bool PolicyScopeHasBeenSet() const { return m_policyScopeHasBeenSet; }
84 inline void SetPolicyScope(PolicyScope value) { m_policyScopeHasBeenSet = true; m_policyScope = value; }
85 inline ResourcePolicy& WithPolicyScope(PolicyScope value) { SetPolicyScope(value); return *this;}
87
89
93 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
94 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
95 template<typename ResourceArnT = Aws::String>
96 void SetResourceArn(ResourceArnT&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::forward<ResourceArnT>(value); }
97 template<typename ResourceArnT = Aws::String>
98 ResourcePolicy& WithResourceArn(ResourceArnT&& value) { SetResourceArn(std::forward<ResourceArnT>(value)); return *this;}
100
102
106 inline const Aws::String& GetRevisionId() const { return m_revisionId; }
107 inline bool RevisionIdHasBeenSet() const { return m_revisionIdHasBeenSet; }
108 template<typename RevisionIdT = Aws::String>
109 void SetRevisionId(RevisionIdT&& value) { m_revisionIdHasBeenSet = true; m_revisionId = std::forward<RevisionIdT>(value); }
110 template<typename RevisionIdT = Aws::String>
111 ResourcePolicy& WithRevisionId(RevisionIdT&& value) { SetRevisionId(std::forward<RevisionIdT>(value)); return *this;}
113 private:
114
115 Aws::String m_policyName;
116 bool m_policyNameHasBeenSet = false;
117
118 Aws::String m_policyDocument;
119 bool m_policyDocumentHasBeenSet = false;
120
121 long long m_lastUpdatedTime{0};
122 bool m_lastUpdatedTimeHasBeenSet = false;
123
124 PolicyScope m_policyScope{PolicyScope::NOT_SET};
125 bool m_policyScopeHasBeenSet = false;
126
127 Aws::String m_resourceArn;
128 bool m_resourceArnHasBeenSet = false;
129
130 Aws::String m_revisionId;
131 bool m_revisionIdHasBeenSet = false;
132 };
133
134} // namespace Model
135} // namespace CloudWatchLogs
136} // 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