aws_sdk_ecr/operation/describe_images/
_describe_images_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeImagesInput {
6    /// <p>The Amazon Web Services account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.</p>
7    pub registry_id: ::std::option::Option<::std::string::String>,
8    /// <p>The repository that contains the images to describe.</p>
9    pub repository_name: ::std::option::Option<::std::string::String>,
10    /// <p>The list of image IDs for the requested repository.</p>
11    pub image_ids: ::std::option::Option<::std::vec::Vec<crate::types::ImageIdentifier>>,
12    /// <p>The <code>nextToken</code> value returned from a previous paginated <code>DescribeImages</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is <code>null</code> when there are no more results to return. This option cannot be used when you specify images with <code>imageIds</code>.</p>
13    pub next_token: ::std::option::Option<::std::string::String>,
14    /// <p>The maximum number of repository results returned by <code>DescribeImages</code> in paginated output. When this parameter is used, <code>DescribeImages</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribeImages</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 1000. If this parameter is not used, then <code>DescribeImages</code> returns up to 100 results and a <code>nextToken</code> value, if applicable. This option cannot be used when you specify images with <code>imageIds</code>.</p>
15    pub max_results: ::std::option::Option<i32>,
16    /// <p>The filter key and value with which to filter your <code>DescribeImages</code> results.</p>
17    pub filter: ::std::option::Option<crate::types::DescribeImagesFilter>,
18}
19impl DescribeImagesInput {
20    /// <p>The Amazon Web Services account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.</p>
21    pub fn registry_id(&self) -> ::std::option::Option<&str> {
22        self.registry_id.as_deref()
23    }
24    /// <p>The repository that contains the images to describe.</p>
25    pub fn repository_name(&self) -> ::std::option::Option<&str> {
26        self.repository_name.as_deref()
27    }
28    /// <p>The list of image IDs for the requested repository.</p>
29    ///
30    /// 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()`.
31    pub fn image_ids(&self) -> &[crate::types::ImageIdentifier] {
32        self.image_ids.as_deref().unwrap_or_default()
33    }
34    /// <p>The <code>nextToken</code> value returned from a previous paginated <code>DescribeImages</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is <code>null</code> when there are no more results to return. This option cannot be used when you specify images with <code>imageIds</code>.</p>
35    pub fn next_token(&self) -> ::std::option::Option<&str> {
36        self.next_token.as_deref()
37    }
38    /// <p>The maximum number of repository results returned by <code>DescribeImages</code> in paginated output. When this parameter is used, <code>DescribeImages</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribeImages</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 1000. If this parameter is not used, then <code>DescribeImages</code> returns up to 100 results and a <code>nextToken</code> value, if applicable. This option cannot be used when you specify images with <code>imageIds</code>.</p>
39    pub fn max_results(&self) -> ::std::option::Option<i32> {
40        self.max_results
41    }
42    /// <p>The filter key and value with which to filter your <code>DescribeImages</code> results.</p>
43    pub fn filter(&self) -> ::std::option::Option<&crate::types::DescribeImagesFilter> {
44        self.filter.as_ref()
45    }
46}
47impl DescribeImagesInput {
48    /// Creates a new builder-style object to manufacture [`DescribeImagesInput`](crate::operation::describe_images::DescribeImagesInput).
49    pub fn builder() -> crate::operation::describe_images::builders::DescribeImagesInputBuilder {
50        crate::operation::describe_images::builders::DescribeImagesInputBuilder::default()
51    }
52}
53
54/// A builder for [`DescribeImagesInput`](crate::operation::describe_images::DescribeImagesInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct DescribeImagesInputBuilder {
58    pub(crate) registry_id: ::std::option::Option<::std::string::String>,
59    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
60    pub(crate) image_ids: ::std::option::Option<::std::vec::Vec<crate::types::ImageIdentifier>>,
61    pub(crate) next_token: ::std::option::Option<::std::string::String>,
62    pub(crate) max_results: ::std::option::Option<i32>,
63    pub(crate) filter: ::std::option::Option<crate::types::DescribeImagesFilter>,
64}
65impl DescribeImagesInputBuilder {
66    /// <p>The Amazon Web Services account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.</p>
67    pub fn registry_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.registry_id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The Amazon Web Services account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.</p>
72    pub fn set_registry_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.registry_id = input;
74        self
75    }
76    /// <p>The Amazon Web Services account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.</p>
77    pub fn get_registry_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.registry_id
79    }
80    /// <p>The repository that contains the images to describe.</p>
81    /// This field is required.
82    pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.repository_name = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The repository that contains the images to describe.</p>
87    pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.repository_name = input;
89        self
90    }
91    /// <p>The repository that contains the images to describe.</p>
92    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
93        &self.repository_name
94    }
95    /// Appends an item to `image_ids`.
96    ///
97    /// To override the contents of this collection use [`set_image_ids`](Self::set_image_ids).
98    ///
99    /// <p>The list of image IDs for the requested repository.</p>
100    pub fn image_ids(mut self, input: crate::types::ImageIdentifier) -> Self {
101        let mut v = self.image_ids.unwrap_or_default();
102        v.push(input);
103        self.image_ids = ::std::option::Option::Some(v);
104        self
105    }
106    /// <p>The list of image IDs for the requested repository.</p>
107    pub fn set_image_ids(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImageIdentifier>>) -> Self {
108        self.image_ids = input;
109        self
110    }
111    /// <p>The list of image IDs for the requested repository.</p>
112    pub fn get_image_ids(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImageIdentifier>> {
113        &self.image_ids
114    }
115    /// <p>The <code>nextToken</code> value returned from a previous paginated <code>DescribeImages</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is <code>null</code> when there are no more results to return. This option cannot be used when you specify images with <code>imageIds</code>.</p>
116    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.next_token = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>The <code>nextToken</code> value returned from a previous paginated <code>DescribeImages</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is <code>null</code> when there are no more results to return. This option cannot be used when you specify images with <code>imageIds</code>.</p>
121    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.next_token = input;
123        self
124    }
125    /// <p>The <code>nextToken</code> value returned from a previous paginated <code>DescribeImages</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is <code>null</code> when there are no more results to return. This option cannot be used when you specify images with <code>imageIds</code>.</p>
126    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
127        &self.next_token
128    }
129    /// <p>The maximum number of repository results returned by <code>DescribeImages</code> in paginated output. When this parameter is used, <code>DescribeImages</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribeImages</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 1000. If this parameter is not used, then <code>DescribeImages</code> returns up to 100 results and a <code>nextToken</code> value, if applicable. This option cannot be used when you specify images with <code>imageIds</code>.</p>
130    pub fn max_results(mut self, input: i32) -> Self {
131        self.max_results = ::std::option::Option::Some(input);
132        self
133    }
134    /// <p>The maximum number of repository results returned by <code>DescribeImages</code> in paginated output. When this parameter is used, <code>DescribeImages</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribeImages</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 1000. If this parameter is not used, then <code>DescribeImages</code> returns up to 100 results and a <code>nextToken</code> value, if applicable. This option cannot be used when you specify images with <code>imageIds</code>.</p>
135    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
136        self.max_results = input;
137        self
138    }
139    /// <p>The maximum number of repository results returned by <code>DescribeImages</code> in paginated output. When this parameter is used, <code>DescribeImages</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribeImages</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 1000. If this parameter is not used, then <code>DescribeImages</code> returns up to 100 results and a <code>nextToken</code> value, if applicable. This option cannot be used when you specify images with <code>imageIds</code>.</p>
140    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
141        &self.max_results
142    }
143    /// <p>The filter key and value with which to filter your <code>DescribeImages</code> results.</p>
144    pub fn filter(mut self, input: crate::types::DescribeImagesFilter) -> Self {
145        self.filter = ::std::option::Option::Some(input);
146        self
147    }
148    /// <p>The filter key and value with which to filter your <code>DescribeImages</code> results.</p>
149    pub fn set_filter(mut self, input: ::std::option::Option<crate::types::DescribeImagesFilter>) -> Self {
150        self.filter = input;
151        self
152    }
153    /// <p>The filter key and value with which to filter your <code>DescribeImages</code> results.</p>
154    pub fn get_filter(&self) -> &::std::option::Option<crate::types::DescribeImagesFilter> {
155        &self.filter
156    }
157    /// Consumes the builder and constructs a [`DescribeImagesInput`](crate::operation::describe_images::DescribeImagesInput).
158    pub fn build(
159        self,
160    ) -> ::std::result::Result<crate::operation::describe_images::DescribeImagesInput, ::aws_smithy_types::error::operation::BuildError> {
161        ::std::result::Result::Ok(crate::operation::describe_images::DescribeImagesInput {
162            registry_id: self.registry_id,
163            repository_name: self.repository_name,
164            image_ids: self.image_ids,
165            next_token: self.next_token,
166            max_results: self.max_results,
167            filter: self.filter,
168        })
169    }
170}