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/apigateway/APIGateway_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/DateTime.h>
10 #include <aws/core/utils/memory/stl/AWSMap.h>
11 #include <aws/apigateway/model/MethodSnapshot.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace APIGateway
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p>An immutable representation of a <a>RestApi</a> resource that can be called
31    * by users using <a>Stages</a>. A deployment must be associated with a
32    * <a>Stage</a> for it to be callable over the Internet.</p> <div
33    * class="remarks">To create a deployment, call <code>POST</code> on the
34    * <a>Deployments</a> resource of a <a>RestApi</a>. To view, update, or delete a
35    * deployment, call <code>GET</code>, <code>PATCH</code>, or <code>DELETE</code> on
36    * the specified deployment resource
37    * (<code>/restapis/{restapi_id}/deployments/{deployment_id}</code>).</div> <div
38    * class="seeAlso"><a>RestApi</a>, <a>Deployments</a>, <a>Stage</a>, <a
39    * href="https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html">AWS
40    * CLI</a>, <a href="https://aws.amazon.com/tools/">AWS SDKs</a> </div><p><h3>See
41    * Also:</h3>   <a
42    * href="http://docs.aws.amazon.com/goto/WebAPI/apigateway-2015-07-09/Deployment">AWS
43    * API Reference</a></p>
44    */
45   class AWS_APIGATEWAY_API Deployment
46   {
47   public:
48     Deployment();
49     Deployment(Aws::Utils::Json::JsonView jsonValue);
50     Deployment& operator=(Aws::Utils::Json::JsonView jsonValue);
51     Aws::Utils::Json::JsonValue Jsonize() const;
52 
53 
54     /**
55      * <p>The identifier for the deployment resource.</p>
56      */
GetId()57     inline const Aws::String& GetId() const{ return m_id; }
58 
59     /**
60      * <p>The identifier for the deployment resource.</p>
61      */
IdHasBeenSet()62     inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
63 
64     /**
65      * <p>The identifier for the deployment resource.</p>
66      */
SetId(const Aws::String & value)67     inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
68 
69     /**
70      * <p>The identifier for the deployment resource.</p>
71      */
SetId(Aws::String && value)72     inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
73 
74     /**
75      * <p>The identifier for the deployment resource.</p>
76      */
SetId(const char * value)77     inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
78 
79     /**
80      * <p>The identifier for the deployment resource.</p>
81      */
WithId(const Aws::String & value)82     inline Deployment& WithId(const Aws::String& value) { SetId(value); return *this;}
83 
84     /**
85      * <p>The identifier for the deployment resource.</p>
86      */
WithId(Aws::String && value)87     inline Deployment& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
88 
89     /**
90      * <p>The identifier for the deployment resource.</p>
91      */
WithId(const char * value)92     inline Deployment& WithId(const char* value) { SetId(value); return *this;}
93 
94 
95     /**
96      * <p>The description for the deployment resource.</p>
97      */
GetDescription()98     inline const Aws::String& GetDescription() const{ return m_description; }
99 
100     /**
101      * <p>The description for the deployment resource.</p>
102      */
DescriptionHasBeenSet()103     inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
104 
105     /**
106      * <p>The description for the deployment resource.</p>
107      */
SetDescription(const Aws::String & value)108     inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
109 
110     /**
111      * <p>The description for the deployment resource.</p>
112      */
SetDescription(Aws::String && value)113     inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
114 
115     /**
116      * <p>The description for the deployment resource.</p>
117      */
SetDescription(const char * value)118     inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
119 
120     /**
121      * <p>The description for the deployment resource.</p>
122      */
WithDescription(const Aws::String & value)123     inline Deployment& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
124 
125     /**
126      * <p>The description for the deployment resource.</p>
127      */
WithDescription(Aws::String && value)128     inline Deployment& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
129 
130     /**
131      * <p>The description for the deployment resource.</p>
132      */
WithDescription(const char * value)133     inline Deployment& WithDescription(const char* value) { SetDescription(value); return *this;}
134 
135 
136     /**
137      * <p>The date and time that the deployment resource was created.</p>
138      */
GetCreatedDate()139     inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; }
140 
141     /**
142      * <p>The date and time that the deployment resource was created.</p>
143      */
CreatedDateHasBeenSet()144     inline bool CreatedDateHasBeenSet() const { return m_createdDateHasBeenSet; }
145 
146     /**
147      * <p>The date and time that the deployment resource was created.</p>
148      */
SetCreatedDate(const Aws::Utils::DateTime & value)149     inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDateHasBeenSet = true; m_createdDate = value; }
150 
151     /**
152      * <p>The date and time that the deployment resource was created.</p>
153      */
SetCreatedDate(Aws::Utils::DateTime && value)154     inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDateHasBeenSet = true; m_createdDate = std::move(value); }
155 
156     /**
157      * <p>The date and time that the deployment resource was created.</p>
158      */
WithCreatedDate(const Aws::Utils::DateTime & value)159     inline Deployment& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;}
160 
161     /**
162      * <p>The date and time that the deployment resource was created.</p>
163      */
WithCreatedDate(Aws::Utils::DateTime && value)164     inline Deployment& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;}
165 
166 
167     /**
168      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
169      * resource was created.</p>
170      */
GetApiSummary()171     inline const Aws::Map<Aws::String, Aws::Map<Aws::String, MethodSnapshot>>& GetApiSummary() const{ return m_apiSummary; }
172 
173     /**
174      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
175      * resource was created.</p>
176      */
ApiSummaryHasBeenSet()177     inline bool ApiSummaryHasBeenSet() const { return m_apiSummaryHasBeenSet; }
178 
179     /**
180      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
181      * resource was created.</p>
182      */
SetApiSummary(const Aws::Map<Aws::String,Aws::Map<Aws::String,MethodSnapshot>> & value)183     inline void SetApiSummary(const Aws::Map<Aws::String, Aws::Map<Aws::String, MethodSnapshot>>& value) { m_apiSummaryHasBeenSet = true; m_apiSummary = value; }
184 
185     /**
186      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
187      * resource was created.</p>
188      */
SetApiSummary(Aws::Map<Aws::String,Aws::Map<Aws::String,MethodSnapshot>> && value)189     inline void SetApiSummary(Aws::Map<Aws::String, Aws::Map<Aws::String, MethodSnapshot>>&& value) { m_apiSummaryHasBeenSet = true; m_apiSummary = std::move(value); }
190 
191     /**
192      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
193      * resource was created.</p>
194      */
WithApiSummary(const Aws::Map<Aws::String,Aws::Map<Aws::String,MethodSnapshot>> & value)195     inline Deployment& WithApiSummary(const Aws::Map<Aws::String, Aws::Map<Aws::String, MethodSnapshot>>& value) { SetApiSummary(value); return *this;}
196 
197     /**
198      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
199      * resource was created.</p>
200      */
WithApiSummary(Aws::Map<Aws::String,Aws::Map<Aws::String,MethodSnapshot>> && value)201     inline Deployment& WithApiSummary(Aws::Map<Aws::String, Aws::Map<Aws::String, MethodSnapshot>>&& value) { SetApiSummary(std::move(value)); return *this;}
202 
203     /**
204      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
205      * resource was created.</p>
206      */
AddApiSummary(const Aws::String & key,const Aws::Map<Aws::String,MethodSnapshot> & value)207     inline Deployment& AddApiSummary(const Aws::String& key, const Aws::Map<Aws::String, MethodSnapshot>& value) { m_apiSummaryHasBeenSet = true; m_apiSummary.emplace(key, value); return *this; }
208 
209     /**
210      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
211      * resource was created.</p>
212      */
AddApiSummary(Aws::String && key,const Aws::Map<Aws::String,MethodSnapshot> & value)213     inline Deployment& AddApiSummary(Aws::String&& key, const Aws::Map<Aws::String, MethodSnapshot>& value) { m_apiSummaryHasBeenSet = true; m_apiSummary.emplace(std::move(key), value); return *this; }
214 
215     /**
216      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
217      * resource was created.</p>
218      */
AddApiSummary(const Aws::String & key,Aws::Map<Aws::String,MethodSnapshot> && value)219     inline Deployment& AddApiSummary(const Aws::String& key, Aws::Map<Aws::String, MethodSnapshot>&& value) { m_apiSummaryHasBeenSet = true; m_apiSummary.emplace(key, std::move(value)); return *this; }
220 
221     /**
222      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
223      * resource was created.</p>
224      */
AddApiSummary(Aws::String && key,Aws::Map<Aws::String,MethodSnapshot> && value)225     inline Deployment& AddApiSummary(Aws::String&& key, Aws::Map<Aws::String, MethodSnapshot>&& value) { m_apiSummaryHasBeenSet = true; m_apiSummary.emplace(std::move(key), std::move(value)); return *this; }
226 
227     /**
228      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
229      * resource was created.</p>
230      */
AddApiSummary(const char * key,Aws::Map<Aws::String,MethodSnapshot> && value)231     inline Deployment& AddApiSummary(const char* key, Aws::Map<Aws::String, MethodSnapshot>&& value) { m_apiSummaryHasBeenSet = true; m_apiSummary.emplace(key, std::move(value)); return *this; }
232 
233     /**
234      * <p>A summary of the <a>RestApi</a> at the date and time that the deployment
235      * resource was created.</p>
236      */
AddApiSummary(const char * key,const Aws::Map<Aws::String,MethodSnapshot> & value)237     inline Deployment& AddApiSummary(const char* key, const Aws::Map<Aws::String, MethodSnapshot>& value) { m_apiSummaryHasBeenSet = true; m_apiSummary.emplace(key, value); return *this; }
238 
239   private:
240 
241     Aws::String m_id;
242     bool m_idHasBeenSet;
243 
244     Aws::String m_description;
245     bool m_descriptionHasBeenSet;
246 
247     Aws::Utils::DateTime m_createdDate;
248     bool m_createdDateHasBeenSet;
249 
250     Aws::Map<Aws::String, Aws::Map<Aws::String, MethodSnapshot>> m_apiSummary;
251     bool m_apiSummaryHasBeenSet;
252   };
253 
254 } // namespace Model
255 } // namespace APIGateway
256 } // namespace Aws
257