#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeInstancesHealthInput {
pub environment_name: ::std::option::Option<::std::string::String>,
pub environment_id: ::std::option::Option<::std::string::String>,
pub attribute_names: ::std::option::Option<::std::vec::Vec<crate::types::InstancesHealthAttribute>>,
pub next_token: ::std::option::Option<::std::string::String>,
}
impl DescribeInstancesHealthInput {
pub fn environment_name(&self) -> ::std::option::Option<&str> {
self.environment_name.as_deref()
}
pub fn environment_id(&self) -> ::std::option::Option<&str> {
self.environment_id.as_deref()
}
pub fn attribute_names(&self) -> &[crate::types::InstancesHealthAttribute] {
self.attribute_names.as_deref().unwrap_or_default()
}
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl DescribeInstancesHealthInput {
pub fn builder() -> crate::operation::describe_instances_health::builders::DescribeInstancesHealthInputBuilder {
crate::operation::describe_instances_health::builders::DescribeInstancesHealthInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeInstancesHealthInputBuilder {
pub(crate) environment_name: ::std::option::Option<::std::string::String>,
pub(crate) environment_id: ::std::option::Option<::std::string::String>,
pub(crate) attribute_names: ::std::option::Option<::std::vec::Vec<crate::types::InstancesHealthAttribute>>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl DescribeInstancesHealthInputBuilder {
pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_name = input;
self
}
pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_name
}
pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_id = input;
self
}
pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_id
}
pub fn attribute_names(mut self, input: crate::types::InstancesHealthAttribute) -> Self {
let mut v = self.attribute_names.unwrap_or_default();
v.push(input);
self.attribute_names = ::std::option::Option::Some(v);
self
}
pub fn set_attribute_names(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstancesHealthAttribute>>) -> Self {
self.attribute_names = input;
self
}
pub fn get_attribute_names(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstancesHealthAttribute>> {
&self.attribute_names
}
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 build(
self,
) -> ::std::result::Result<
crate::operation::describe_instances_health::DescribeInstancesHealthInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::describe_instances_health::DescribeInstancesHealthInput {
environment_name: self.environment_name,
environment_id: self.environment_id,
attribute_names: self.attribute_names,
next_token: self.next_token,
})
}
}