#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListInstancesInput {
pub next_token: ::std::option::Option<::std::string::String>,
pub max_results: ::std::option::Option<i32>,
pub instance_name_filter: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub instance_state_filter: ::std::option::Option<::std::vec::Vec<crate::types::InstanceState>>,
}
impl ListInstancesInput {
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.max_results
}
pub fn instance_name_filter(&self) -> &[::std::string::String] {
self.instance_name_filter.as_deref().unwrap_or_default()
}
pub fn instance_state_filter(&self) -> &[crate::types::InstanceState] {
self.instance_state_filter.as_deref().unwrap_or_default()
}
}
impl ListInstancesInput {
pub fn builder() -> crate::operation::list_instances::builders::ListInstancesInputBuilder {
crate::operation::list_instances::builders::ListInstancesInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListInstancesInputBuilder {
pub(crate) next_token: ::std::option::Option<::std::string::String>,
pub(crate) max_results: ::std::option::Option<i32>,
pub(crate) instance_name_filter: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) instance_state_filter: ::std::option::Option<::std::vec::Vec<crate::types::InstanceState>>,
}
impl ListInstancesInputBuilder {
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = ::std::option::Option::Some(input);
self
}
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
&self.max_results
}
pub fn instance_name_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.instance_name_filter.unwrap_or_default();
v.push(input.into());
self.instance_name_filter = ::std::option::Option::Some(v);
self
}
pub fn set_instance_name_filter(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.instance_name_filter = input;
self
}
pub fn get_instance_name_filter(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.instance_name_filter
}
pub fn instance_state_filter(mut self, input: crate::types::InstanceState) -> Self {
let mut v = self.instance_state_filter.unwrap_or_default();
v.push(input);
self.instance_state_filter = ::std::option::Option::Some(v);
self
}
pub fn set_instance_state_filter(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceState>>) -> Self {
self.instance_state_filter = input;
self
}
pub fn get_instance_state_filter(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceState>> {
&self.instance_state_filter
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::list_instances::ListInstancesInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_instances::ListInstancesInput {
next_token: self.next_token,
max_results: self.max_results,
instance_name_filter: self.instance_name_filter,
instance_state_filter: self.instance_state_filter,
})
}
}