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/elasticbeanstalk/ElasticBeanstalk_EXPORTS.h>
8 #include <aws/elasticbeanstalk/ElasticBeanstalkRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace ElasticBeanstalk
15 {
16 namespace Model
17 {
18 
19   /**
20    * <p/><p><h3>See Also:</h3>   <a
21    * href="http://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RestartAppServerMessage">AWS
22    * API Reference</a></p>
23    */
24   class AWS_ELASTICBEANSTALK_API RestartAppServerRequest : public ElasticBeanstalkRequest
25   {
26   public:
27     RestartAppServerRequest();
28 
29     // Service request name is the Operation name which will send this request out,
30     // each operation should has unique request name, so that we can get operation's name from this request.
31     // Note: this is not true for response, multiple operations may have the same response name,
32     // so we can not get operation's name from response.
GetServiceRequestName()33     inline virtual const char* GetServiceRequestName() const override { return "RestartAppServer"; }
34 
35     Aws::String SerializePayload() const override;
36 
37   protected:
38     void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
39 
40   public:
41 
42     /**
43      * <p>The ID of the environment to restart the server for.</p> <p> Condition: You
44      * must specify either this or an EnvironmentName, or both. If you do not specify
45      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
46      * error. </p>
47      */
GetEnvironmentId()48     inline const Aws::String& GetEnvironmentId() const{ return m_environmentId; }
49 
50     /**
51      * <p>The ID of the environment to restart the server for.</p> <p> Condition: You
52      * must specify either this or an EnvironmentName, or both. If you do not specify
53      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
54      * error. </p>
55      */
EnvironmentIdHasBeenSet()56     inline bool EnvironmentIdHasBeenSet() const { return m_environmentIdHasBeenSet; }
57 
58     /**
59      * <p>The ID of the environment to restart the server for.</p> <p> Condition: You
60      * must specify either this or an EnvironmentName, or both. If you do not specify
61      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
62      * error. </p>
63      */
SetEnvironmentId(const Aws::String & value)64     inline void SetEnvironmentId(const Aws::String& value) { m_environmentIdHasBeenSet = true; m_environmentId = value; }
65 
66     /**
67      * <p>The ID of the environment to restart the server for.</p> <p> Condition: You
68      * must specify either this or an EnvironmentName, or both. If you do not specify
69      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
70      * error. </p>
71      */
SetEnvironmentId(Aws::String && value)72     inline void SetEnvironmentId(Aws::String&& value) { m_environmentIdHasBeenSet = true; m_environmentId = std::move(value); }
73 
74     /**
75      * <p>The ID of the environment to restart the server for.</p> <p> Condition: You
76      * must specify either this or an EnvironmentName, or both. If you do not specify
77      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
78      * error. </p>
79      */
SetEnvironmentId(const char * value)80     inline void SetEnvironmentId(const char* value) { m_environmentIdHasBeenSet = true; m_environmentId.assign(value); }
81 
82     /**
83      * <p>The ID of the environment to restart the server for.</p> <p> Condition: You
84      * must specify either this or an EnvironmentName, or both. If you do not specify
85      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
86      * error. </p>
87      */
WithEnvironmentId(const Aws::String & value)88     inline RestartAppServerRequest& WithEnvironmentId(const Aws::String& value) { SetEnvironmentId(value); return *this;}
89 
90     /**
91      * <p>The ID of the environment to restart the server for.</p> <p> Condition: You
92      * must specify either this or an EnvironmentName, or both. If you do not specify
93      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
94      * error. </p>
95      */
WithEnvironmentId(Aws::String && value)96     inline RestartAppServerRequest& WithEnvironmentId(Aws::String&& value) { SetEnvironmentId(std::move(value)); return *this;}
97 
98     /**
99      * <p>The ID of the environment to restart the server for.</p> <p> Condition: You
100      * must specify either this or an EnvironmentName, or both. If you do not specify
101      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
102      * error. </p>
103      */
WithEnvironmentId(const char * value)104     inline RestartAppServerRequest& WithEnvironmentId(const char* value) { SetEnvironmentId(value); return *this;}
105 
106 
107     /**
108      * <p>The name of the environment to restart the server for.</p> <p> Condition: You
109      * must specify either this or an EnvironmentId, or both. If you do not specify
110      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
111      * error. </p>
112      */
GetEnvironmentName()113     inline const Aws::String& GetEnvironmentName() const{ return m_environmentName; }
114 
115     /**
116      * <p>The name of the environment to restart the server for.</p> <p> Condition: You
117      * must specify either this or an EnvironmentId, or both. If you do not specify
118      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
119      * error. </p>
120      */
EnvironmentNameHasBeenSet()121     inline bool EnvironmentNameHasBeenSet() const { return m_environmentNameHasBeenSet; }
122 
123     /**
124      * <p>The name of the environment to restart the server for.</p> <p> Condition: You
125      * must specify either this or an EnvironmentId, or both. If you do not specify
126      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
127      * error. </p>
128      */
SetEnvironmentName(const Aws::String & value)129     inline void SetEnvironmentName(const Aws::String& value) { m_environmentNameHasBeenSet = true; m_environmentName = value; }
130 
131     /**
132      * <p>The name of the environment to restart the server for.</p> <p> Condition: You
133      * must specify either this or an EnvironmentId, or both. If you do not specify
134      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
135      * error. </p>
136      */
SetEnvironmentName(Aws::String && value)137     inline void SetEnvironmentName(Aws::String&& value) { m_environmentNameHasBeenSet = true; m_environmentName = std::move(value); }
138 
139     /**
140      * <p>The name of the environment to restart the server for.</p> <p> Condition: You
141      * must specify either this or an EnvironmentId, or both. If you do not specify
142      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
143      * error. </p>
144      */
SetEnvironmentName(const char * value)145     inline void SetEnvironmentName(const char* value) { m_environmentNameHasBeenSet = true; m_environmentName.assign(value); }
146 
147     /**
148      * <p>The name of the environment to restart the server for.</p> <p> Condition: You
149      * must specify either this or an EnvironmentId, or both. If you do not specify
150      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
151      * error. </p>
152      */
WithEnvironmentName(const Aws::String & value)153     inline RestartAppServerRequest& WithEnvironmentName(const Aws::String& value) { SetEnvironmentName(value); return *this;}
154 
155     /**
156      * <p>The name of the environment to restart the server for.</p> <p> Condition: You
157      * must specify either this or an EnvironmentId, or both. If you do not specify
158      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
159      * error. </p>
160      */
WithEnvironmentName(Aws::String && value)161     inline RestartAppServerRequest& WithEnvironmentName(Aws::String&& value) { SetEnvironmentName(std::move(value)); return *this;}
162 
163     /**
164      * <p>The name of the environment to restart the server for.</p> <p> Condition: You
165      * must specify either this or an EnvironmentId, or both. If you do not specify
166      * either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code>
167      * error. </p>
168      */
WithEnvironmentName(const char * value)169     inline RestartAppServerRequest& WithEnvironmentName(const char* value) { SetEnvironmentName(value); return *this;}
170 
171   private:
172 
173     Aws::String m_environmentId;
174     bool m_environmentIdHasBeenSet;
175 
176     Aws::String m_environmentName;
177     bool m_environmentNameHasBeenSet;
178   };
179 
180 } // namespace Model
181 } // namespace ElasticBeanstalk
182 } // namespace Aws
183