1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchGetImageInput {
/// <p>The Amazon Web Services account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default registry is assumed.</p>
pub registry_id: ::std::option::Option<::std::string::String>,
/// <p>The repository that contains the images to describe.</p>
pub repository_name: ::std::option::Option<::std::string::String>,
/// <p>A list of image ID references that correspond to images to describe. The format of the <code>imageIds</code> reference is <code>imageTag=tag</code> or <code>imageDigest=digest</code>.</p>
pub image_ids: ::std::option::Option<::std::vec::Vec<crate::types::ImageIdentifier>>,
/// <p>The accepted media types for the request.</p>
/// <p>Valid values: <code>application/vnd.docker.distribution.manifest.v1+json</code> | <code>application/vnd.docker.distribution.manifest.v2+json</code> | <code>application/vnd.oci.image.manifest.v1+json</code></p>
pub accepted_media_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchGetImageInput {
/// <p>The Amazon Web Services account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default registry is assumed.</p>
pub fn registry_id(&self) -> ::std::option::Option<&str> {
self.registry_id.as_deref()
}
/// <p>The repository that contains the images to describe.</p>
pub fn repository_name(&self) -> ::std::option::Option<&str> {
self.repository_name.as_deref()
}
/// <p>A list of image ID references that correspond to images to describe. The format of the <code>imageIds</code> reference is <code>imageTag=tag</code> or <code>imageDigest=digest</code>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.image_ids.is_none()`.
pub fn image_ids(&self) -> &[crate::types::ImageIdentifier] {
self.image_ids.as_deref().unwrap_or_default()
}
/// <p>The accepted media types for the request.</p>
/// <p>Valid values: <code>application/vnd.docker.distribution.manifest.v1+json</code> | <code>application/vnd.docker.distribution.manifest.v2+json</code> | <code>application/vnd.oci.image.manifest.v1+json</code></p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.accepted_media_types.is_none()`.
pub fn accepted_media_types(&self) -> &[::std::string::String] {
self.accepted_media_types.as_deref().unwrap_or_default()
}
}
impl BatchGetImageInput {
/// Creates a new builder-style object to manufacture [`BatchGetImageInput`](crate::operation::batch_get_image::BatchGetImageInput).
pub fn builder() -> crate::operation::batch_get_image::builders::BatchGetImageInputBuilder {
crate::operation::batch_get_image::builders::BatchGetImageInputBuilder::default()
}
}
/// A builder for [`BatchGetImageInput`](crate::operation::batch_get_image::BatchGetImageInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetImageInputBuilder {
pub(crate) registry_id: ::std::option::Option<::std::string::String>,
pub(crate) repository_name: ::std::option::Option<::std::string::String>,
pub(crate) image_ids: ::std::option::Option<::std::vec::Vec<crate::types::ImageIdentifier>>,
pub(crate) accepted_media_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchGetImageInputBuilder {
/// <p>The Amazon Web Services account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default registry is assumed.</p>
pub fn registry_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.registry_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Web Services account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default registry is assumed.</p>
pub fn set_registry_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.registry_id = input;
self
}
/// <p>The Amazon Web Services account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default registry is assumed.</p>
pub fn get_registry_id(&self) -> &::std::option::Option<::std::string::String> {
&self.registry_id
}
/// <p>The repository that contains the images to describe.</p>
/// This field is required.
pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.repository_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The repository that contains the images to describe.</p>
pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.repository_name = input;
self
}
/// <p>The repository that contains the images to describe.</p>
pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
&self.repository_name
}
/// Appends an item to `image_ids`.
///
/// To override the contents of this collection use [`set_image_ids`](Self::set_image_ids).
///
/// <p>A list of image ID references that correspond to images to describe. The format of the <code>imageIds</code> reference is <code>imageTag=tag</code> or <code>imageDigest=digest</code>.</p>
pub fn image_ids(mut self, input: crate::types::ImageIdentifier) -> Self {
let mut v = self.image_ids.unwrap_or_default();
v.push(input);
self.image_ids = ::std::option::Option::Some(v);
self
}
/// <p>A list of image ID references that correspond to images to describe. The format of the <code>imageIds</code> reference is <code>imageTag=tag</code> or <code>imageDigest=digest</code>.</p>
pub fn set_image_ids(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImageIdentifier>>) -> Self {
self.image_ids = input;
self
}
/// <p>A list of image ID references that correspond to images to describe. The format of the <code>imageIds</code> reference is <code>imageTag=tag</code> or <code>imageDigest=digest</code>.</p>
pub fn get_image_ids(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImageIdentifier>> {
&self.image_ids
}
/// Appends an item to `accepted_media_types`.
///
/// To override the contents of this collection use [`set_accepted_media_types`](Self::set_accepted_media_types).
///
/// <p>The accepted media types for the request.</p>
/// <p>Valid values: <code>application/vnd.docker.distribution.manifest.v1+json</code> | <code>application/vnd.docker.distribution.manifest.v2+json</code> | <code>application/vnd.oci.image.manifest.v1+json</code></p>
pub fn accepted_media_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.accepted_media_types.unwrap_or_default();
v.push(input.into());
self.accepted_media_types = ::std::option::Option::Some(v);
self
}
/// <p>The accepted media types for the request.</p>
/// <p>Valid values: <code>application/vnd.docker.distribution.manifest.v1+json</code> | <code>application/vnd.docker.distribution.manifest.v2+json</code> | <code>application/vnd.oci.image.manifest.v1+json</code></p>
pub fn set_accepted_media_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.accepted_media_types = input;
self
}
/// <p>The accepted media types for the request.</p>
/// <p>Valid values: <code>application/vnd.docker.distribution.manifest.v1+json</code> | <code>application/vnd.docker.distribution.manifest.v2+json</code> | <code>application/vnd.oci.image.manifest.v1+json</code></p>
pub fn get_accepted_media_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.accepted_media_types
}
/// Consumes the builder and constructs a [`BatchGetImageInput`](crate::operation::batch_get_image::BatchGetImageInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::batch_get_image::BatchGetImageInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::batch_get_image::BatchGetImageInput {
registry_id: self.registry_id,
repository_name: self.repository_name,
image_ids: self.image_ids,
accepted_media_types: self.accepted_media_types,
})
}
}