AWS SDK for C++

AWS SDK for C++ Version 1.11.852

Loading...
Searching...
No Matches
NodeLifecycleScript.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/pcs/PCS_EXPORTS.h>
10#include <aws/pcs/model/ExecutionPolicy.h>
11#include <aws/pcs/model/OnError.h>
12#include <aws/pcs/model/ScriptSource.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace PCS {
24namespace Model {
25
33 public:
34 AWS_PCS_API NodeLifecycleScript() = default;
38
40
45 inline const Aws::String& GetName() const { return m_name; }
46 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
47 template <typename NameT = Aws::String>
48 void SetName(NameT&& value) {
49 m_nameHasBeenSet = true;
50 m_name = std::forward<NameT>(value);
51 }
52 template <typename NameT = Aws::String>
53 NodeLifecycleScript& WithName(NameT&& value) {
54 SetName(std::forward<NameT>(value));
55 return *this;
56 }
58
60
63 inline const ScriptSource& GetScriptSource() const { return m_scriptSource; }
64 inline bool ScriptSourceHasBeenSet() const { return m_scriptSourceHasBeenSet; }
65 template <typename ScriptSourceT = ScriptSource>
66 void SetScriptSource(ScriptSourceT&& value) {
67 m_scriptSourceHasBeenSet = true;
68 m_scriptSource = std::forward<ScriptSourceT>(value);
69 }
70 template <typename ScriptSourceT = ScriptSource>
71 NodeLifecycleScript& WithScriptSource(ScriptSourceT&& value) {
72 SetScriptSource(std::forward<ScriptSourceT>(value));
73 return *this;
74 }
76
78
82 inline const Aws::Vector<Aws::String>& GetArguments() const { return m_arguments; }
83 inline bool ArgumentsHasBeenSet() const { return m_argumentsHasBeenSet; }
84 template <typename ArgumentsT = Aws::Vector<Aws::String>>
85 void SetArguments(ArgumentsT&& value) {
86 m_argumentsHasBeenSet = true;
87 m_arguments = std::forward<ArgumentsT>(value);
88 }
89 template <typename ArgumentsT = Aws::Vector<Aws::String>>
90 NodeLifecycleScript& WithArguments(ArgumentsT&& value) {
91 SetArguments(std::forward<ArgumentsT>(value));
92 return *this;
93 }
94 template <typename ArgumentsT = Aws::String>
95 NodeLifecycleScript& AddArguments(ArgumentsT&& value) {
96 m_argumentsHasBeenSet = true;
97 m_arguments.emplace_back(std::forward<ArgumentsT>(value));
98 return *this;
99 }
101
103
111 inline OnError GetOnError() const { return m_onError; }
112 inline bool OnErrorHasBeenSet() const { return m_onErrorHasBeenSet; }
113 inline void SetOnError(OnError value) {
114 m_onErrorHasBeenSet = true;
115 m_onError = value;
116 }
118 SetOnError(value);
119 return *this;
120 }
122
124
131 inline ExecutionPolicy GetExecutionPolicy() const { return m_executionPolicy; }
132 inline bool ExecutionPolicyHasBeenSet() const { return m_executionPolicyHasBeenSet; }
134 m_executionPolicyHasBeenSet = true;
135 m_executionPolicy = value;
136 }
138 SetExecutionPolicy(value);
139 return *this;
140 }
142 private:
143 Aws::String m_name;
144
145 ScriptSource m_scriptSource;
146
147 Aws::Vector<Aws::String> m_arguments;
148
149 OnError m_onError{OnError::NOT_SET};
150
151 ExecutionPolicy m_executionPolicy{ExecutionPolicy::NOT_SET};
152 bool m_nameHasBeenSet = false;
153 bool m_scriptSourceHasBeenSet = false;
154 bool m_argumentsHasBeenSet = false;
155 bool m_onErrorHasBeenSet = false;
156 bool m_executionPolicyHasBeenSet = false;
157};
158
159} // namespace Model
160} // namespace PCS
161} // namespace Aws
AWS_PCS_API Aws::Utils::Json::JsonValue Jsonize() const
NodeLifecycleScript & WithName(NameT &&value)
NodeLifecycleScript & AddArguments(ArgumentsT &&value)
AWS_PCS_API NodeLifecycleScript & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_PCS_API NodeLifecycleScript(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetName() const
void SetExecutionPolicy(ExecutionPolicy value)
void SetScriptSource(ScriptSourceT &&value)
AWS_PCS_API NodeLifecycleScript()=default
const ScriptSource & GetScriptSource() const
NodeLifecycleScript & WithOnError(OnError value)
NodeLifecycleScript & WithScriptSource(ScriptSourceT &&value)
const Aws::Vector< Aws::String > & GetArguments() const
NodeLifecycleScript & WithExecutionPolicy(ExecutionPolicy value)
NodeLifecycleScript & WithArguments(ArgumentsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue