AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Container.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/lightsail/model/ContainerServiceProtocol.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace Lightsail
25{
26namespace Model
27{
28
37 {
38 public:
39 AWS_LIGHTSAIL_API Container() = default;
40 AWS_LIGHTSAIL_API Container(Aws::Utils::Json::JsonView jsonValue);
41 AWS_LIGHTSAIL_API Container& operator=(Aws::Utils::Json::JsonView jsonValue);
42 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
43
44
46
61 inline const Aws::String& GetImage() const { return m_image; }
62 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
63 template<typename ImageT = Aws::String>
64 void SetImage(ImageT&& value) { m_imageHasBeenSet = true; m_image = std::forward<ImageT>(value); }
65 template<typename ImageT = Aws::String>
66 Container& WithImage(ImageT&& value) { SetImage(std::forward<ImageT>(value)); return *this;}
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) { m_commandHasBeenSet = true; m_command = std::forward<CommandT>(value); }
77 template<typename CommandT = Aws::Vector<Aws::String>>
78 Container& WithCommand(CommandT&& value) { SetCommand(std::forward<CommandT>(value)); return *this;}
79 template<typename CommandT = Aws::String>
80 Container& AddCommand(CommandT&& value) { m_commandHasBeenSet = true; m_command.emplace_back(std::forward<CommandT>(value)); return *this; }
82
84
87 inline const Aws::Map<Aws::String, Aws::String>& GetEnvironment() const { return m_environment; }
88 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
89 template<typename EnvironmentT = Aws::Map<Aws::String, Aws::String>>
90 void SetEnvironment(EnvironmentT&& value) { m_environmentHasBeenSet = true; m_environment = std::forward<EnvironmentT>(value); }
91 template<typename EnvironmentT = Aws::Map<Aws::String, Aws::String>>
92 Container& WithEnvironment(EnvironmentT&& value) { SetEnvironment(std::forward<EnvironmentT>(value)); return *this;}
93 template<typename EnvironmentKeyT = Aws::String, typename EnvironmentValueT = Aws::String>
94 Container& AddEnvironment(EnvironmentKeyT&& key, EnvironmentValueT&& value) {
95 m_environmentHasBeenSet = true; m_environment.emplace(std::forward<EnvironmentKeyT>(key), std::forward<EnvironmentValueT>(value)); return *this;
96 }
98
100
103 inline const Aws::Map<Aws::String, ContainerServiceProtocol>& GetPorts() const { return m_ports; }
104 inline bool PortsHasBeenSet() const { return m_portsHasBeenSet; }
105 template<typename PortsT = Aws::Map<Aws::String, ContainerServiceProtocol>>
106 void SetPorts(PortsT&& value) { m_portsHasBeenSet = true; m_ports = std::forward<PortsT>(value); }
107 template<typename PortsT = Aws::Map<Aws::String, ContainerServiceProtocol>>
108 Container& WithPorts(PortsT&& value) { SetPorts(std::forward<PortsT>(value)); return *this;}
110 m_portsHasBeenSet = true; m_ports.emplace(key, value); return *this;
111 }
113 private:
114
115 Aws::String m_image;
116 bool m_imageHasBeenSet = false;
117
118 Aws::Vector<Aws::String> m_command;
119 bool m_commandHasBeenSet = false;
120
122 bool m_environmentHasBeenSet = false;
123
125 bool m_portsHasBeenSet = false;
126 };
127
128} // namespace Model
129} // namespace Lightsail
130} // namespace Aws
const Aws::Vector< Aws::String > & GetCommand() const
Definition Container.h:73
const Aws::Map< Aws::String, ContainerServiceProtocol > & GetPorts() const
Definition Container.h:103
const Aws::String & GetImage() const
Definition Container.h:61
AWS_LIGHTSAIL_API Container(Aws::Utils::Json::JsonView jsonValue)
Container & AddEnvironment(EnvironmentKeyT &&key, EnvironmentValueT &&value)
Definition Container.h:94
void SetEnvironment(EnvironmentT &&value)
Definition Container.h:90
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
Container & WithImage(ImageT &&value)
Definition Container.h:66
void SetPorts(PortsT &&value)
Definition Container.h:106
AWS_LIGHTSAIL_API Container & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetImage(ImageT &&value)
Definition Container.h:64
Container & AddCommand(CommandT &&value)
Definition Container.h:80
const Aws::Map< Aws::String, Aws::String > & GetEnvironment() const
Definition Container.h:87
Container & AddPorts(Aws::String key, ContainerServiceProtocol value)
Definition Container.h:109
Container & WithPorts(PortsT &&value)
Definition Container.h:108
void SetCommand(CommandT &&value)
Definition Container.h:76
Container & WithEnvironment(EnvironmentT &&value)
Definition Container.h:92
Container & WithCommand(CommandT &&value)
Definition Container.h:78
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