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/ecr/ECR_EXPORTS.h>
8 #include <aws/ecr/ECRRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace ECR
15 {
16 namespace Model
17 {
18 
19   /**
20    */
21   class AWS_ECR_API PutImageRequest : public ECRRequest
22   {
23   public:
24     PutImageRequest();
25 
26     // Service request name is the Operation name which will send this request out,
27     // each operation should has unique request name, so that we can get operation's name from this request.
28     // Note: this is not true for response, multiple operations may have the same response name,
29     // so we can not get operation's name from response.
GetServiceRequestName()30     inline virtual const char* GetServiceRequestName() const override { return "PutImage"; }
31 
32     Aws::String SerializePayload() const override;
33 
34     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
35 
36 
37     /**
38      * <p>The Amazon Web Services account ID associated with the registry that contains
39      * the repository in which to put the image. If you do not specify a registry, the
40      * default registry is assumed.</p>
41      */
GetRegistryId()42     inline const Aws::String& GetRegistryId() const{ return m_registryId; }
43 
44     /**
45      * <p>The Amazon Web Services account ID associated with the registry that contains
46      * the repository in which to put the image. If you do not specify a registry, the
47      * default registry is assumed.</p>
48      */
RegistryIdHasBeenSet()49     inline bool RegistryIdHasBeenSet() const { return m_registryIdHasBeenSet; }
50 
51     /**
52      * <p>The Amazon Web Services account ID associated with the registry that contains
53      * the repository in which to put the image. If you do not specify a registry, the
54      * default registry is assumed.</p>
55      */
SetRegistryId(const Aws::String & value)56     inline void SetRegistryId(const Aws::String& value) { m_registryIdHasBeenSet = true; m_registryId = value; }
57 
58     /**
59      * <p>The Amazon Web Services account ID associated with the registry that contains
60      * the repository in which to put the image. If you do not specify a registry, the
61      * default registry is assumed.</p>
62      */
SetRegistryId(Aws::String && value)63     inline void SetRegistryId(Aws::String&& value) { m_registryIdHasBeenSet = true; m_registryId = std::move(value); }
64 
65     /**
66      * <p>The Amazon Web Services account ID associated with the registry that contains
67      * the repository in which to put the image. If you do not specify a registry, the
68      * default registry is assumed.</p>
69      */
SetRegistryId(const char * value)70     inline void SetRegistryId(const char* value) { m_registryIdHasBeenSet = true; m_registryId.assign(value); }
71 
72     /**
73      * <p>The Amazon Web Services account ID associated with the registry that contains
74      * the repository in which to put the image. If you do not specify a registry, the
75      * default registry is assumed.</p>
76      */
WithRegistryId(const Aws::String & value)77     inline PutImageRequest& WithRegistryId(const Aws::String& value) { SetRegistryId(value); return *this;}
78 
79     /**
80      * <p>The Amazon Web Services account ID associated with the registry that contains
81      * the repository in which to put the image. If you do not specify a registry, the
82      * default registry is assumed.</p>
83      */
WithRegistryId(Aws::String && value)84     inline PutImageRequest& WithRegistryId(Aws::String&& value) { SetRegistryId(std::move(value)); return *this;}
85 
86     /**
87      * <p>The Amazon Web Services account ID associated with the registry that contains
88      * the repository in which to put the image. If you do not specify a registry, the
89      * default registry is assumed.</p>
90      */
WithRegistryId(const char * value)91     inline PutImageRequest& WithRegistryId(const char* value) { SetRegistryId(value); return *this;}
92 
93 
94     /**
95      * <p>The name of the repository in which to put the image.</p>
96      */
GetRepositoryName()97     inline const Aws::String& GetRepositoryName() const{ return m_repositoryName; }
98 
99     /**
100      * <p>The name of the repository in which to put the image.</p>
101      */
RepositoryNameHasBeenSet()102     inline bool RepositoryNameHasBeenSet() const { return m_repositoryNameHasBeenSet; }
103 
104     /**
105      * <p>The name of the repository in which to put the image.</p>
106      */
SetRepositoryName(const Aws::String & value)107     inline void SetRepositoryName(const Aws::String& value) { m_repositoryNameHasBeenSet = true; m_repositoryName = value; }
108 
109     /**
110      * <p>The name of the repository in which to put the image.</p>
111      */
SetRepositoryName(Aws::String && value)112     inline void SetRepositoryName(Aws::String&& value) { m_repositoryNameHasBeenSet = true; m_repositoryName = std::move(value); }
113 
114     /**
115      * <p>The name of the repository in which to put the image.</p>
116      */
SetRepositoryName(const char * value)117     inline void SetRepositoryName(const char* value) { m_repositoryNameHasBeenSet = true; m_repositoryName.assign(value); }
118 
119     /**
120      * <p>The name of the repository in which to put the image.</p>
121      */
WithRepositoryName(const Aws::String & value)122     inline PutImageRequest& WithRepositoryName(const Aws::String& value) { SetRepositoryName(value); return *this;}
123 
124     /**
125      * <p>The name of the repository in which to put the image.</p>
126      */
WithRepositoryName(Aws::String && value)127     inline PutImageRequest& WithRepositoryName(Aws::String&& value) { SetRepositoryName(std::move(value)); return *this;}
128 
129     /**
130      * <p>The name of the repository in which to put the image.</p>
131      */
WithRepositoryName(const char * value)132     inline PutImageRequest& WithRepositoryName(const char* value) { SetRepositoryName(value); return *this;}
133 
134 
135     /**
136      * <p>The image manifest corresponding to the image to be uploaded.</p>
137      */
GetImageManifest()138     inline const Aws::String& GetImageManifest() const{ return m_imageManifest; }
139 
140     /**
141      * <p>The image manifest corresponding to the image to be uploaded.</p>
142      */
ImageManifestHasBeenSet()143     inline bool ImageManifestHasBeenSet() const { return m_imageManifestHasBeenSet; }
144 
145     /**
146      * <p>The image manifest corresponding to the image to be uploaded.</p>
147      */
SetImageManifest(const Aws::String & value)148     inline void SetImageManifest(const Aws::String& value) { m_imageManifestHasBeenSet = true; m_imageManifest = value; }
149 
150     /**
151      * <p>The image manifest corresponding to the image to be uploaded.</p>
152      */
SetImageManifest(Aws::String && value)153     inline void SetImageManifest(Aws::String&& value) { m_imageManifestHasBeenSet = true; m_imageManifest = std::move(value); }
154 
155     /**
156      * <p>The image manifest corresponding to the image to be uploaded.</p>
157      */
SetImageManifest(const char * value)158     inline void SetImageManifest(const char* value) { m_imageManifestHasBeenSet = true; m_imageManifest.assign(value); }
159 
160     /**
161      * <p>The image manifest corresponding to the image to be uploaded.</p>
162      */
WithImageManifest(const Aws::String & value)163     inline PutImageRequest& WithImageManifest(const Aws::String& value) { SetImageManifest(value); return *this;}
164 
165     /**
166      * <p>The image manifest corresponding to the image to be uploaded.</p>
167      */
WithImageManifest(Aws::String && value)168     inline PutImageRequest& WithImageManifest(Aws::String&& value) { SetImageManifest(std::move(value)); return *this;}
169 
170     /**
171      * <p>The image manifest corresponding to the image to be uploaded.</p>
172      */
WithImageManifest(const char * value)173     inline PutImageRequest& WithImageManifest(const char* value) { SetImageManifest(value); return *this;}
174 
175 
176     /**
177      * <p>The media type of the image manifest. If you push an image manifest that does
178      * not contain the <code>mediaType</code> field, you must specify the
179      * <code>imageManifestMediaType</code> in the request.</p>
180      */
GetImageManifestMediaType()181     inline const Aws::String& GetImageManifestMediaType() const{ return m_imageManifestMediaType; }
182 
183     /**
184      * <p>The media type of the image manifest. If you push an image manifest that does
185      * not contain the <code>mediaType</code> field, you must specify the
186      * <code>imageManifestMediaType</code> in the request.</p>
187      */
ImageManifestMediaTypeHasBeenSet()188     inline bool ImageManifestMediaTypeHasBeenSet() const { return m_imageManifestMediaTypeHasBeenSet; }
189 
190     /**
191      * <p>The media type of the image manifest. If you push an image manifest that does
192      * not contain the <code>mediaType</code> field, you must specify the
193      * <code>imageManifestMediaType</code> in the request.</p>
194      */
SetImageManifestMediaType(const Aws::String & value)195     inline void SetImageManifestMediaType(const Aws::String& value) { m_imageManifestMediaTypeHasBeenSet = true; m_imageManifestMediaType = value; }
196 
197     /**
198      * <p>The media type of the image manifest. If you push an image manifest that does
199      * not contain the <code>mediaType</code> field, you must specify the
200      * <code>imageManifestMediaType</code> in the request.</p>
201      */
SetImageManifestMediaType(Aws::String && value)202     inline void SetImageManifestMediaType(Aws::String&& value) { m_imageManifestMediaTypeHasBeenSet = true; m_imageManifestMediaType = std::move(value); }
203 
204     /**
205      * <p>The media type of the image manifest. If you push an image manifest that does
206      * not contain the <code>mediaType</code> field, you must specify the
207      * <code>imageManifestMediaType</code> in the request.</p>
208      */
SetImageManifestMediaType(const char * value)209     inline void SetImageManifestMediaType(const char* value) { m_imageManifestMediaTypeHasBeenSet = true; m_imageManifestMediaType.assign(value); }
210 
211     /**
212      * <p>The media type of the image manifest. If you push an image manifest that does
213      * not contain the <code>mediaType</code> field, you must specify the
214      * <code>imageManifestMediaType</code> in the request.</p>
215      */
WithImageManifestMediaType(const Aws::String & value)216     inline PutImageRequest& WithImageManifestMediaType(const Aws::String& value) { SetImageManifestMediaType(value); return *this;}
217 
218     /**
219      * <p>The media type of the image manifest. If you push an image manifest that does
220      * not contain the <code>mediaType</code> field, you must specify the
221      * <code>imageManifestMediaType</code> in the request.</p>
222      */
WithImageManifestMediaType(Aws::String && value)223     inline PutImageRequest& WithImageManifestMediaType(Aws::String&& value) { SetImageManifestMediaType(std::move(value)); return *this;}
224 
225     /**
226      * <p>The media type of the image manifest. If you push an image manifest that does
227      * not contain the <code>mediaType</code> field, you must specify the
228      * <code>imageManifestMediaType</code> in the request.</p>
229      */
WithImageManifestMediaType(const char * value)230     inline PutImageRequest& WithImageManifestMediaType(const char* value) { SetImageManifestMediaType(value); return *this;}
231 
232 
233     /**
234      * <p>The tag to associate with the image. This parameter is required for images
235      * that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative
236      * (OCI) formats.</p>
237      */
GetImageTag()238     inline const Aws::String& GetImageTag() const{ return m_imageTag; }
239 
240     /**
241      * <p>The tag to associate with the image. This parameter is required for images
242      * that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative
243      * (OCI) formats.</p>
244      */
ImageTagHasBeenSet()245     inline bool ImageTagHasBeenSet() const { return m_imageTagHasBeenSet; }
246 
247     /**
248      * <p>The tag to associate with the image. This parameter is required for images
249      * that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative
250      * (OCI) formats.</p>
251      */
SetImageTag(const Aws::String & value)252     inline void SetImageTag(const Aws::String& value) { m_imageTagHasBeenSet = true; m_imageTag = value; }
253 
254     /**
255      * <p>The tag to associate with the image. This parameter is required for images
256      * that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative
257      * (OCI) formats.</p>
258      */
SetImageTag(Aws::String && value)259     inline void SetImageTag(Aws::String&& value) { m_imageTagHasBeenSet = true; m_imageTag = std::move(value); }
260 
261     /**
262      * <p>The tag to associate with the image. This parameter is required for images
263      * that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative
264      * (OCI) formats.</p>
265      */
SetImageTag(const char * value)266     inline void SetImageTag(const char* value) { m_imageTagHasBeenSet = true; m_imageTag.assign(value); }
267 
268     /**
269      * <p>The tag to associate with the image. This parameter is required for images
270      * that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative
271      * (OCI) formats.</p>
272      */
WithImageTag(const Aws::String & value)273     inline PutImageRequest& WithImageTag(const Aws::String& value) { SetImageTag(value); return *this;}
274 
275     /**
276      * <p>The tag to associate with the image. This parameter is required for images
277      * that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative
278      * (OCI) formats.</p>
279      */
WithImageTag(Aws::String && value)280     inline PutImageRequest& WithImageTag(Aws::String&& value) { SetImageTag(std::move(value)); return *this;}
281 
282     /**
283      * <p>The tag to associate with the image. This parameter is required for images
284      * that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative
285      * (OCI) formats.</p>
286      */
WithImageTag(const char * value)287     inline PutImageRequest& WithImageTag(const char* value) { SetImageTag(value); return *this;}
288 
289 
290     /**
291      * <p>The image digest of the image manifest corresponding to the image.</p>
292      */
GetImageDigest()293     inline const Aws::String& GetImageDigest() const{ return m_imageDigest; }
294 
295     /**
296      * <p>The image digest of the image manifest corresponding to the image.</p>
297      */
ImageDigestHasBeenSet()298     inline bool ImageDigestHasBeenSet() const { return m_imageDigestHasBeenSet; }
299 
300     /**
301      * <p>The image digest of the image manifest corresponding to the image.</p>
302      */
SetImageDigest(const Aws::String & value)303     inline void SetImageDigest(const Aws::String& value) { m_imageDigestHasBeenSet = true; m_imageDigest = value; }
304 
305     /**
306      * <p>The image digest of the image manifest corresponding to the image.</p>
307      */
SetImageDigest(Aws::String && value)308     inline void SetImageDigest(Aws::String&& value) { m_imageDigestHasBeenSet = true; m_imageDigest = std::move(value); }
309 
310     /**
311      * <p>The image digest of the image manifest corresponding to the image.</p>
312      */
SetImageDigest(const char * value)313     inline void SetImageDigest(const char* value) { m_imageDigestHasBeenSet = true; m_imageDigest.assign(value); }
314 
315     /**
316      * <p>The image digest of the image manifest corresponding to the image.</p>
317      */
WithImageDigest(const Aws::String & value)318     inline PutImageRequest& WithImageDigest(const Aws::String& value) { SetImageDigest(value); return *this;}
319 
320     /**
321      * <p>The image digest of the image manifest corresponding to the image.</p>
322      */
WithImageDigest(Aws::String && value)323     inline PutImageRequest& WithImageDigest(Aws::String&& value) { SetImageDigest(std::move(value)); return *this;}
324 
325     /**
326      * <p>The image digest of the image manifest corresponding to the image.</p>
327      */
WithImageDigest(const char * value)328     inline PutImageRequest& WithImageDigest(const char* value) { SetImageDigest(value); return *this;}
329 
330   private:
331 
332     Aws::String m_registryId;
333     bool m_registryIdHasBeenSet;
334 
335     Aws::String m_repositoryName;
336     bool m_repositoryNameHasBeenSet;
337 
338     Aws::String m_imageManifest;
339     bool m_imageManifestHasBeenSet;
340 
341     Aws::String m_imageManifestMediaType;
342     bool m_imageManifestMediaTypeHasBeenSet;
343 
344     Aws::String m_imageTag;
345     bool m_imageTagHasBeenSet;
346 
347     Aws::String m_imageDigest;
348     bool m_imageDigestHasBeenSet;
349   };
350 
351 } // namespace Model
352 } // namespace ECR
353 } // namespace Aws
354