AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ContainerRestartPolicy.h
1
6#pragma once
7#include <aws/ecs/ECS_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <utility>
10
11namespace Aws
12{
13namespace Utils
14{
15namespace Json
16{
17 class JsonValue;
18 class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace ECS
22{
23namespace Model
24{
25
40 {
41 public:
46
47
49
52 inline bool GetEnabled() const{ return m_enabled; }
53 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
54 inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
55 inline ContainerRestartPolicy& WithEnabled(bool value) { SetEnabled(value); return *this;}
57
59
64 inline const Aws::Vector<int>& GetIgnoredExitCodes() const{ return m_ignoredExitCodes; }
65 inline bool IgnoredExitCodesHasBeenSet() const { return m_ignoredExitCodesHasBeenSet; }
66 inline void SetIgnoredExitCodes(const Aws::Vector<int>& value) { m_ignoredExitCodesHasBeenSet = true; m_ignoredExitCodes = value; }
67 inline void SetIgnoredExitCodes(Aws::Vector<int>&& value) { m_ignoredExitCodesHasBeenSet = true; m_ignoredExitCodes = std::move(value); }
69 inline ContainerRestartPolicy& WithIgnoredExitCodes(Aws::Vector<int>&& value) { SetIgnoredExitCodes(std::move(value)); return *this;}
70 inline ContainerRestartPolicy& AddIgnoredExitCodes(int value) { m_ignoredExitCodesHasBeenSet = true; m_ignoredExitCodes.push_back(value); return *this; }
72
74
83 inline int GetRestartAttemptPeriod() const{ return m_restartAttemptPeriod; }
84 inline bool RestartAttemptPeriodHasBeenSet() const { return m_restartAttemptPeriodHasBeenSet; }
85 inline void SetRestartAttemptPeriod(int value) { m_restartAttemptPeriodHasBeenSet = true; m_restartAttemptPeriod = value; }
88 private:
89
90 bool m_enabled;
91 bool m_enabledHasBeenSet = false;
92
93 Aws::Vector<int> m_ignoredExitCodes;
94 bool m_ignoredExitCodesHasBeenSet = false;
95
96 int m_restartAttemptPeriod;
97 bool m_restartAttemptPeriodHasBeenSet = false;
98 };
99
100} // namespace Model
101} // namespace ECS
102} // namespace Aws
void SetIgnoredExitCodes(Aws::Vector< int > &&value)
ContainerRestartPolicy & WithRestartAttemptPeriod(int value)
void SetIgnoredExitCodes(const Aws::Vector< int > &value)
ContainerRestartPolicy & WithIgnoredExitCodes(Aws::Vector< int > &&value)
ContainerRestartPolicy & AddIgnoredExitCodes(int value)
ContainerRestartPolicy & WithIgnoredExitCodes(const Aws::Vector< int > &value)
const Aws::Vector< int > & GetIgnoredExitCodes() const
AWS_ECS_API ContainerRestartPolicy(Aws::Utils::Json::JsonView jsonValue)
AWS_ECS_API ContainerRestartPolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
ContainerRestartPolicy & WithEnabled(bool value)
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue