AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
Container.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/lightsail/Lightsail_EXPORTS.h>
11#include <aws/lightsail/model/ContainerServiceProtocol.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace Lightsail {
23namespace Model {
24
32class Container {
33 public:
34 AWS_LIGHTSAIL_API Container() = default;
35 AWS_LIGHTSAIL_API Container(Aws::Utils::Json::JsonView jsonValue);
36 AWS_LIGHTSAIL_API Container& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
55 inline const Aws::String& GetImage() const { return m_image; }
56 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
57 template <typename ImageT = Aws::String>
58 void SetImage(ImageT&& value) {
59 m_imageHasBeenSet = true;
60 m_image = std::forward<ImageT>(value);
61 }
62 template <typename ImageT = Aws::String>
63 Container& WithImage(ImageT&& value) {
64 SetImage(std::forward<ImageT>(value));
65 return *this;
66 }
68
70
73 inline const Aws::Vector<Aws::String>& GetCommand() const { return m_command; }
74 inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; }
75 template <typename CommandT = Aws::Vector<Aws::String>>
76 void SetCommand(CommandT&& value) {
77 m_commandHasBeenSet = true;
78 m_command = std::forward<CommandT>(value);
79 }
80 template <typename CommandT = Aws::Vector<Aws::String>>
81 Container& WithCommand(CommandT&& value) {
82 SetCommand(std::forward<CommandT>(value));
83 return *this;
84 }
85 template <typename CommandT = Aws::String>
86 Container& AddCommand(CommandT&& value) {
87 m_commandHasBeenSet = true;
88 m_command.emplace_back(std::forward<CommandT>(value));
89 return *this;
90 }
92
94
97 inline const Aws::Map<Aws::String, Aws::String>& GetEnvironment() const { return m_environment; }
98 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
99 template <typename EnvironmentT = Aws::Map<Aws::String, Aws::String>>
100 void SetEnvironment(EnvironmentT&& value) {
101 m_environmentHasBeenSet = true;
102 m_environment = std::forward<EnvironmentT>(value);
103 }
104 template <typename EnvironmentT = Aws::Map<Aws::String, Aws::String>>
105 Container& WithEnvironment(EnvironmentT&& value) {
106 SetEnvironment(std::forward<EnvironmentT>(value));
107 return *this;
108 }
109 template <typename EnvironmentKeyT = Aws::String, typename EnvironmentValueT = Aws::String>
110 Container& AddEnvironment(EnvironmentKeyT&& key, EnvironmentValueT&& value) {
111 m_environmentHasBeenSet = true;
112 m_environment.emplace(std::forward<EnvironmentKeyT>(key), std::forward<EnvironmentValueT>(value));
113 return *this;
114 }
116
118
121 inline const Aws::Map<Aws::String, ContainerServiceProtocol>& GetPorts() const { return m_ports; }
122 inline bool PortsHasBeenSet() const { return m_portsHasBeenSet; }
123 template <typename PortsT = Aws::Map<Aws::String, ContainerServiceProtocol>>
124 void SetPorts(PortsT&& value) {
125 m_portsHasBeenSet = true;
126 m_ports = std::forward<PortsT>(value);
127 }
128 template <typename PortsT = Aws::Map<Aws::String, ContainerServiceProtocol>>
129 Container& WithPorts(PortsT&& value) {
130 SetPorts(std::forward<PortsT>(value));
131 return *this;
132 }
134 m_portsHasBeenSet = true;
135 m_ports.emplace(key, value);
136 return *this;
137 }
139 private:
140 Aws::String m_image;
141
142 Aws::Vector<Aws::String> m_command;
143
145
147 bool m_imageHasBeenSet = false;
148 bool m_commandHasBeenSet = false;
149 bool m_environmentHasBeenSet = false;
150 bool m_portsHasBeenSet = false;
151};
152
153} // namespace Model
154} // namespace Lightsail
155} // namespace Aws
const Aws::Vector< Aws::String > & GetCommand() const
Definition Container.h:73
const Aws::Map< Aws::String, ContainerServiceProtocol > & GetPorts() const
Definition Container.h:121
const Aws::String & GetImage() const
Definition Container.h:55
AWS_LIGHTSAIL_API Container(Aws::Utils::Json::JsonView jsonValue)
Container & AddEnvironment(EnvironmentKeyT &&key, EnvironmentValueT &&value)
Definition Container.h:110
void SetEnvironment(EnvironmentT &&value)
Definition Container.h:100
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
Container & WithImage(ImageT &&value)
Definition Container.h:63
void SetPorts(PortsT &&value)
Definition Container.h:124
AWS_LIGHTSAIL_API Container & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetImage(ImageT &&value)
Definition Container.h:58
Container & AddCommand(CommandT &&value)
Definition Container.h:86
const Aws::Map< Aws::String, Aws::String > & GetEnvironment() const
Definition Container.h:97
Container & AddPorts(Aws::String key, ContainerServiceProtocol value)
Definition Container.h:133
Container & WithPorts(PortsT &&value)
Definition Container.h:129
void SetCommand(CommandT &&value)
Definition Container.h:76
Container & WithEnvironment(EnvironmentT &&value)
Definition Container.h:105
Container & WithCommand(CommandT &&value)
Definition Container.h:81
AWS_LIGHTSAIL_API Container()=default
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue