aws_sdk_appstream/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 names of the public or private images to describe.</p>
7    pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>The ARNs of the public, private, and shared images to describe.</p>
9    pub arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <p>The type of image (public, private, or shared) to describe.</p>
11    pub r#type: ::std::option::Option<crate::types::VisibilityType>,
12    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
13    pub next_token: ::std::option::Option<::std::string::String>,
14    /// <p>The maximum size of each page of results.</p>
15    pub max_results: ::std::option::Option<i32>,
16}
17impl DescribeImagesInput {
18    /// <p>The names of the public or private images to describe.</p>
19    ///
20    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.names.is_none()`.
21    pub fn names(&self) -> &[::std::string::String] {
22        self.names.as_deref().unwrap_or_default()
23    }
24    /// <p>The ARNs of the public, private, and shared images to describe.</p>
25    ///
26    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.arns.is_none()`.
27    pub fn arns(&self) -> &[::std::string::String] {
28        self.arns.as_deref().unwrap_or_default()
29    }
30    /// <p>The type of image (public, private, or shared) to describe.</p>
31    pub fn r#type(&self) -> ::std::option::Option<&crate::types::VisibilityType> {
32        self.r#type.as_ref()
33    }
34    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
35    pub fn next_token(&self) -> ::std::option::Option<&str> {
36        self.next_token.as_deref()
37    }
38    /// <p>The maximum size of each page of results.</p>
39    pub fn max_results(&self) -> ::std::option::Option<i32> {
40        self.max_results
41    }
42}
43impl DescribeImagesInput {
44    /// Creates a new builder-style object to manufacture [`DescribeImagesInput`](crate::operation::describe_images::DescribeImagesInput).
45    pub fn builder() -> crate::operation::describe_images::builders::DescribeImagesInputBuilder {
46        crate::operation::describe_images::builders::DescribeImagesInputBuilder::default()
47    }
48}
49
50/// A builder for [`DescribeImagesInput`](crate::operation::describe_images::DescribeImagesInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct DescribeImagesInputBuilder {
54    pub(crate) names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
55    pub(crate) arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
56    pub(crate) r#type: ::std::option::Option<crate::types::VisibilityType>,
57    pub(crate) next_token: ::std::option::Option<::std::string::String>,
58    pub(crate) max_results: ::std::option::Option<i32>,
59}
60impl DescribeImagesInputBuilder {
61    /// Appends an item to `names`.
62    ///
63    /// To override the contents of this collection use [`set_names`](Self::set_names).
64    ///
65    /// <p>The names of the public or private images to describe.</p>
66    pub fn names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        let mut v = self.names.unwrap_or_default();
68        v.push(input.into());
69        self.names = ::std::option::Option::Some(v);
70        self
71    }
72    /// <p>The names of the public or private images to describe.</p>
73    pub fn set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
74        self.names = input;
75        self
76    }
77    /// <p>The names of the public or private images to describe.</p>
78    pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
79        &self.names
80    }
81    /// Appends an item to `arns`.
82    ///
83    /// To override the contents of this collection use [`set_arns`](Self::set_arns).
84    ///
85    /// <p>The ARNs of the public, private, and shared images to describe.</p>
86    pub fn arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        let mut v = self.arns.unwrap_or_default();
88        v.push(input.into());
89        self.arns = ::std::option::Option::Some(v);
90        self
91    }
92    /// <p>The ARNs of the public, private, and shared images to describe.</p>
93    pub fn set_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
94        self.arns = input;
95        self
96    }
97    /// <p>The ARNs of the public, private, and shared images to describe.</p>
98    pub fn get_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
99        &self.arns
100    }
101    /// <p>The type of image (public, private, or shared) to describe.</p>
102    pub fn r#type(mut self, input: crate::types::VisibilityType) -> Self {
103        self.r#type = ::std::option::Option::Some(input);
104        self
105    }
106    /// <p>The type of image (public, private, or shared) to describe.</p>
107    pub fn set_type(mut self, input: ::std::option::Option<crate::types::VisibilityType>) -> Self {
108        self.r#type = input;
109        self
110    }
111    /// <p>The type of image (public, private, or shared) to describe.</p>
112    pub fn get_type(&self) -> &::std::option::Option<crate::types::VisibilityType> {
113        &self.r#type
114    }
115    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</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 pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</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 pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
126    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
127        &self.next_token
128    }
129    /// <p>The maximum size of each page of results.</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 size of each page of results.</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 size of each page of results.</p>
140    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
141        &self.max_results
142    }
143    /// Consumes the builder and constructs a [`DescribeImagesInput`](crate::operation::describe_images::DescribeImagesInput).
144    pub fn build(
145        self,
146    ) -> ::std::result::Result<crate::operation::describe_images::DescribeImagesInput, ::aws_smithy_types::error::operation::BuildError> {
147        ::std::result::Result::Ok(crate::operation::describe_images::DescribeImagesInput {
148            names: self.names,
149            arns: self.arns,
150            r#type: self.r#type,
151            next_token: self.next_token,
152            max_results: self.max_results,
153        })
154    }
155}