1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/lightsail/Lightsail_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/lightsail/model/ContainerServiceHealthCheckConfig.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace Lightsail
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Describes the settings of a public endpoint for an Amazon Lightsail container
29    * service.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/EndpointRequest">AWS
31    * API Reference</a></p>
32    */
33   class AWS_LIGHTSAIL_API EndpointRequest
34   {
35   public:
36     EndpointRequest();
37     EndpointRequest(Aws::Utils::Json::JsonView jsonValue);
38     EndpointRequest& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>The name of the container for the endpoint.</p>
44      */
GetContainerName()45     inline const Aws::String& GetContainerName() const{ return m_containerName; }
46 
47     /**
48      * <p>The name of the container for the endpoint.</p>
49      */
ContainerNameHasBeenSet()50     inline bool ContainerNameHasBeenSet() const { return m_containerNameHasBeenSet; }
51 
52     /**
53      * <p>The name of the container for the endpoint.</p>
54      */
SetContainerName(const Aws::String & value)55     inline void SetContainerName(const Aws::String& value) { m_containerNameHasBeenSet = true; m_containerName = value; }
56 
57     /**
58      * <p>The name of the container for the endpoint.</p>
59      */
SetContainerName(Aws::String && value)60     inline void SetContainerName(Aws::String&& value) { m_containerNameHasBeenSet = true; m_containerName = std::move(value); }
61 
62     /**
63      * <p>The name of the container for the endpoint.</p>
64      */
SetContainerName(const char * value)65     inline void SetContainerName(const char* value) { m_containerNameHasBeenSet = true; m_containerName.assign(value); }
66 
67     /**
68      * <p>The name of the container for the endpoint.</p>
69      */
WithContainerName(const Aws::String & value)70     inline EndpointRequest& WithContainerName(const Aws::String& value) { SetContainerName(value); return *this;}
71 
72     /**
73      * <p>The name of the container for the endpoint.</p>
74      */
WithContainerName(Aws::String && value)75     inline EndpointRequest& WithContainerName(Aws::String&& value) { SetContainerName(std::move(value)); return *this;}
76 
77     /**
78      * <p>The name of the container for the endpoint.</p>
79      */
WithContainerName(const char * value)80     inline EndpointRequest& WithContainerName(const char* value) { SetContainerName(value); return *this;}
81 
82 
83     /**
84      * <p>The port of the container to which traffic is forwarded to.</p>
85      */
GetContainerPort()86     inline int GetContainerPort() const{ return m_containerPort; }
87 
88     /**
89      * <p>The port of the container to which traffic is forwarded to.</p>
90      */
ContainerPortHasBeenSet()91     inline bool ContainerPortHasBeenSet() const { return m_containerPortHasBeenSet; }
92 
93     /**
94      * <p>The port of the container to which traffic is forwarded to.</p>
95      */
SetContainerPort(int value)96     inline void SetContainerPort(int value) { m_containerPortHasBeenSet = true; m_containerPort = value; }
97 
98     /**
99      * <p>The port of the container to which traffic is forwarded to.</p>
100      */
WithContainerPort(int value)101     inline EndpointRequest& WithContainerPort(int value) { SetContainerPort(value); return *this;}
102 
103 
104     /**
105      * <p>An object that describes the health check configuration of the container.</p>
106      */
GetHealthCheck()107     inline const ContainerServiceHealthCheckConfig& GetHealthCheck() const{ return m_healthCheck; }
108 
109     /**
110      * <p>An object that describes the health check configuration of the container.</p>
111      */
HealthCheckHasBeenSet()112     inline bool HealthCheckHasBeenSet() const { return m_healthCheckHasBeenSet; }
113 
114     /**
115      * <p>An object that describes the health check configuration of the container.</p>
116      */
SetHealthCheck(const ContainerServiceHealthCheckConfig & value)117     inline void SetHealthCheck(const ContainerServiceHealthCheckConfig& value) { m_healthCheckHasBeenSet = true; m_healthCheck = value; }
118 
119     /**
120      * <p>An object that describes the health check configuration of the container.</p>
121      */
SetHealthCheck(ContainerServiceHealthCheckConfig && value)122     inline void SetHealthCheck(ContainerServiceHealthCheckConfig&& value) { m_healthCheckHasBeenSet = true; m_healthCheck = std::move(value); }
123 
124     /**
125      * <p>An object that describes the health check configuration of the container.</p>
126      */
WithHealthCheck(const ContainerServiceHealthCheckConfig & value)127     inline EndpointRequest& WithHealthCheck(const ContainerServiceHealthCheckConfig& value) { SetHealthCheck(value); return *this;}
128 
129     /**
130      * <p>An object that describes the health check configuration of the container.</p>
131      */
WithHealthCheck(ContainerServiceHealthCheckConfig && value)132     inline EndpointRequest& WithHealthCheck(ContainerServiceHealthCheckConfig&& value) { SetHealthCheck(std::move(value)); return *this;}
133 
134   private:
135 
136     Aws::String m_containerName;
137     bool m_containerNameHasBeenSet;
138 
139     int m_containerPort;
140     bool m_containerPortHasBeenSet;
141 
142     ContainerServiceHealthCheckConfig m_healthCheck;
143     bool m_healthCheckHasBeenSet;
144   };
145 
146 } // namespace Model
147 } // namespace Lightsail
148 } // namespace Aws
149