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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Deletes specified images within a specified repository. Images are specified with either the <code>imageTag</code> or <code>imageDigest</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchDeleteImageInput {
/// <p>The Amazon Web Services account ID associated with the registry that contains the image to delete. 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 image to delete.</p>
pub repository_name: ::std::option::Option<::std::string::String>,
/// <p>A list of image ID references that correspond to images to delete. 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>>,
}
impl BatchDeleteImageInput {
/// <p>The Amazon Web Services account ID associated with the registry that contains the image to delete. 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 image to delete.</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 delete. 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()
}
}
impl BatchDeleteImageInput {
/// Creates a new builder-style object to manufacture [`BatchDeleteImageInput`](crate::operation::batch_delete_image::BatchDeleteImageInput).
pub fn builder() -> crate::operation::batch_delete_image::builders::BatchDeleteImageInputBuilder {
crate::operation::batch_delete_image::builders::BatchDeleteImageInputBuilder::default()
}
}
/// A builder for [`BatchDeleteImageInput`](crate::operation::batch_delete_image::BatchDeleteImageInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchDeleteImageInputBuilder {
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>>,
}
impl BatchDeleteImageInputBuilder {
/// <p>The Amazon Web Services account ID associated with the registry that contains the image to delete. 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 image to delete. 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 image to delete. 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 image to delete.</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 image to delete.</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 image to delete.</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 delete. 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 delete. 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 delete. 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
}
/// Consumes the builder and constructs a [`BatchDeleteImageInput`](crate::operation::batch_delete_image::BatchDeleteImageInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::batch_delete_image::BatchDeleteImageInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::batch_delete_image::BatchDeleteImageInput {
registry_id: self.registry_id,
repository_name: self.repository_name,
image_ids: self.image_ids,
})
}
}