aws_sdk_appstream/operation/describe_images/
_describe_images_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeImagesInput {
6 pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8 pub arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10 pub r#type: ::std::option::Option<crate::types::VisibilityType>,
12 pub next_token: ::std::option::Option<::std::string::String>,
14 pub max_results: ::std::option::Option<i32>,
16}
17impl DescribeImagesInput {
18 pub fn names(&self) -> &[::std::string::String] {
22 self.names.as_deref().unwrap_or_default()
23 }
24 pub fn arns(&self) -> &[::std::string::String] {
28 self.arns.as_deref().unwrap_or_default()
29 }
30 pub fn r#type(&self) -> ::std::option::Option<&crate::types::VisibilityType> {
32 self.r#type.as_ref()
33 }
34 pub fn next_token(&self) -> ::std::option::Option<&str> {
36 self.next_token.as_deref()
37 }
38 pub fn max_results(&self) -> ::std::option::Option<i32> {
40 self.max_results
41 }
42}
43impl DescribeImagesInput {
44 pub fn builder() -> crate::operation::describe_images::builders::DescribeImagesInputBuilder {
46 crate::operation::describe_images::builders::DescribeImagesInputBuilder::default()
47 }
48}
49
50#[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 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 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 pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
79 &self.names
80 }
81 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 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 pub fn get_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
99 &self.arns
100 }
101 pub fn r#type(mut self, input: crate::types::VisibilityType) -> Self {
103 self.r#type = ::std::option::Option::Some(input);
104 self
105 }
106 pub fn set_type(mut self, input: ::std::option::Option<crate::types::VisibilityType>) -> Self {
108 self.r#type = input;
109 self
110 }
111 pub fn get_type(&self) -> &::std::option::Option<crate::types::VisibilityType> {
113 &self.r#type
114 }
115 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 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.next_token = input;
123 self
124 }
125 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
127 &self.next_token
128 }
129 pub fn max_results(mut self, input: i32) -> Self {
131 self.max_results = ::std::option::Option::Some(input);
132 self
133 }
134 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
136 self.max_results = input;
137 self
138 }
139 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
141 &self.max_results
142 }
143 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}