#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateHealthCheckOutput {
pub health_check: ::std::option::Option<crate::types::HealthCheck>,
pub location: ::std::string::String,
_request_id: Option<String>,
}
impl CreateHealthCheckOutput {
pub fn health_check(&self) -> ::std::option::Option<&crate::types::HealthCheck> {
self.health_check.as_ref()
}
pub fn location(&self) -> &str {
use std::ops::Deref;
self.location.deref()
}
}
impl ::aws_types::request_id::RequestId for CreateHealthCheckOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateHealthCheckOutput {
pub fn builder() -> crate::operation::create_health_check::builders::CreateHealthCheckOutputBuilder {
crate::operation::create_health_check::builders::CreateHealthCheckOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateHealthCheckOutputBuilder {
pub(crate) health_check: ::std::option::Option<crate::types::HealthCheck>,
pub(crate) location: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateHealthCheckOutputBuilder {
pub fn health_check(mut self, input: crate::types::HealthCheck) -> Self {
self.health_check = ::std::option::Option::Some(input);
self
}
pub fn set_health_check(mut self, input: ::std::option::Option<crate::types::HealthCheck>) -> Self {
self.health_check = input;
self
}
pub fn get_health_check(&self) -> &::std::option::Option<crate::types::HealthCheck> {
&self.health_check
}
pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.location = ::std::option::Option::Some(input.into());
self
}
pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.location = input;
self
}
pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
&self.location
}
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::create_health_check::CreateHealthCheckOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_health_check::CreateHealthCheckOutput {
health_check: self.health_check,
location: self.location.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"location",
"location was not specified but it is required when building CreateHealthCheckOutput",
)
})?,
_request_id: self._request_id,
})
}
}