AWS SDK for C++

AWS SDK for C++ Version 1.11.900

Loading...
Searching...
No Matches
ScopedActions.h
1
6#pragma once
7#include <aws/cloudwatchomni/CloudWatchOmni_EXPORTS.h>
8#include <aws/cloudwatchomni/model/ResourceScope.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/crt/cbor/Cbor.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Cbor {
19class CborValue;
20} // namespace Cbor
21} // namespace Utils
22namespace CloudWatchOmni {
23namespace Model {
24
33 public:
34 AWS_CLOUDWATCHOMNI_API ScopedActions() = default;
35 AWS_CLOUDWATCHOMNI_API ScopedActions(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_CLOUDWATCHOMNI_API ScopedActions& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
37 AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
38
40
43 inline const Aws::Vector<Aws::String>& GetActions() const { return m_actions; }
44 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
45 template <typename ActionsT = Aws::Vector<Aws::String>>
46 void SetActions(ActionsT&& value) {
47 m_actionsHasBeenSet = true;
48 m_actions = std::forward<ActionsT>(value);
49 }
50 template <typename ActionsT = Aws::Vector<Aws::String>>
51 ScopedActions& WithActions(ActionsT&& value) {
52 SetActions(std::forward<ActionsT>(value));
53 return *this;
54 }
55 template <typename ActionsT = Aws::String>
56 ScopedActions& AddActions(ActionsT&& value) {
57 m_actionsHasBeenSet = true;
58 m_actions.emplace_back(std::forward<ActionsT>(value));
59 return *this;
60 }
62
64
68 inline const Aws::Vector<ResourceScope>& GetResources() const { return m_resources; }
69 inline bool ResourcesHasBeenSet() const { return m_resourcesHasBeenSet; }
70 template <typename ResourcesT = Aws::Vector<ResourceScope>>
71 void SetResources(ResourcesT&& value) {
72 m_resourcesHasBeenSet = true;
73 m_resources = std::forward<ResourcesT>(value);
74 }
75 template <typename ResourcesT = Aws::Vector<ResourceScope>>
76 ScopedActions& WithResources(ResourcesT&& value) {
77 SetResources(std::forward<ResourcesT>(value));
78 return *this;
79 }
80 template <typename ResourcesT = ResourceScope>
81 ScopedActions& AddResources(ResourcesT&& value) {
82 m_resourcesHasBeenSet = true;
83 m_resources.emplace_back(std::forward<ResourcesT>(value));
84 return *this;
85 }
87
89
93 inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetContextConditions() const { return m_contextConditions; }
94 inline bool ContextConditionsHasBeenSet() const { return m_contextConditionsHasBeenSet; }
95 template <typename ContextConditionsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
96 void SetContextConditions(ContextConditionsT&& value) {
97 m_contextConditionsHasBeenSet = true;
98 m_contextConditions = std::forward<ContextConditionsT>(value);
99 }
100 template <typename ContextConditionsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
101 ScopedActions& WithContextConditions(ContextConditionsT&& value) {
102 SetContextConditions(std::forward<ContextConditionsT>(value));
103 return *this;
104 }
105 template <typename ContextConditionsKeyT = Aws::String, typename ContextConditionsValueT = Aws::Vector<Aws::String>>
106 ScopedActions& AddContextConditions(ContextConditionsKeyT&& key, ContextConditionsValueT&& value) {
107 m_contextConditionsHasBeenSet = true;
108 m_contextConditions.emplace(std::forward<ContextConditionsKeyT>(key), std::forward<ContextConditionsValueT>(value));
109 return *this;
110 }
112 private:
113 Aws::Vector<Aws::String> m_actions;
114
115 Aws::Vector<ResourceScope> m_resources;
116
118 bool m_actionsHasBeenSet = false;
119 bool m_resourcesHasBeenSet = false;
120 bool m_contextConditionsHasBeenSet = false;
121};
122
123} // namespace Model
124} // namespace CloudWatchOmni
125} // namespace Aws
AWS_CLOUDWATCHOMNI_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
AWS_CLOUDWATCHOMNI_API ScopedActions()=default
ScopedActions & AddResources(ResourcesT &&value)
const Aws::Map< Aws::String, Aws::Vector< Aws::String > > & GetContextConditions() const
const Aws::Vector< Aws::String > & GetActions() const
AWS_CLOUDWATCHOMNI_API ScopedActions(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
ScopedActions & WithActions(ActionsT &&value)
ScopedActions & AddActions(ActionsT &&value)
ScopedActions & WithContextConditions(ContextConditionsT &&value)
AWS_CLOUDWATCHOMNI_API ScopedActions & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetContextConditions(ContextConditionsT &&value)
ScopedActions & WithResources(ResourcesT &&value)
const Aws::Vector< ResourceScope > & GetResources() const
ScopedActions & AddContextConditions(ContextConditionsKeyT &&key, ContextConditionsValueT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::vector< T, Aws::Allocator< T > > Vector