#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetHealthCheckStatusOutput {
pub health_check_observations: ::std::vec::Vec<crate::types::HealthCheckObservation>,
_request_id: Option<String>,
}
impl GetHealthCheckStatusOutput {
pub fn health_check_observations(&self) -> &[crate::types::HealthCheckObservation] {
use std::ops::Deref;
self.health_check_observations.deref()
}
}
impl ::aws_types::request_id::RequestId for GetHealthCheckStatusOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetHealthCheckStatusOutput {
pub fn builder() -> crate::operation::get_health_check_status::builders::GetHealthCheckStatusOutputBuilder {
crate::operation::get_health_check_status::builders::GetHealthCheckStatusOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetHealthCheckStatusOutputBuilder {
pub(crate) health_check_observations: ::std::option::Option<::std::vec::Vec<crate::types::HealthCheckObservation>>,
_request_id: Option<String>,
}
impl GetHealthCheckStatusOutputBuilder {
pub fn health_check_observations(mut self, input: crate::types::HealthCheckObservation) -> Self {
let mut v = self.health_check_observations.unwrap_or_default();
v.push(input);
self.health_check_observations = ::std::option::Option::Some(v);
self
}
pub fn set_health_check_observations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HealthCheckObservation>>) -> Self {
self.health_check_observations = input;
self
}
pub fn get_health_check_observations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HealthCheckObservation>> {
&self.health_check_observations
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_health_check_status::GetHealthCheckStatusOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_health_check_status::GetHealthCheckStatusOutput {
health_check_observations: self.health_check_observations.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"health_check_observations",
"health_check_observations was not specified but it is required when building GetHealthCheckStatusOutput",
)
})?,
_request_id: self._request_id,
})
}
}