#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeregisterNotificationHubOutput {
pub notification_hub_region: ::std::string::String,
pub status_summary: ::std::option::Option<crate::types::NotificationHubStatusSummary>,
_request_id: Option<String>,
}
impl DeregisterNotificationHubOutput {
pub fn notification_hub_region(&self) -> &str {
use std::ops::Deref;
self.notification_hub_region.deref()
}
pub fn status_summary(&self) -> ::std::option::Option<&crate::types::NotificationHubStatusSummary> {
self.status_summary.as_ref()
}
}
impl ::aws_types::request_id::RequestId for DeregisterNotificationHubOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DeregisterNotificationHubOutput {
pub fn builder() -> crate::operation::deregister_notification_hub::builders::DeregisterNotificationHubOutputBuilder {
crate::operation::deregister_notification_hub::builders::DeregisterNotificationHubOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeregisterNotificationHubOutputBuilder {
pub(crate) notification_hub_region: ::std::option::Option<::std::string::String>,
pub(crate) status_summary: ::std::option::Option<crate::types::NotificationHubStatusSummary>,
_request_id: Option<String>,
}
impl DeregisterNotificationHubOutputBuilder {
pub fn notification_hub_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.notification_hub_region = ::std::option::Option::Some(input.into());
self
}
pub fn set_notification_hub_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.notification_hub_region = input;
self
}
pub fn get_notification_hub_region(&self) -> &::std::option::Option<::std::string::String> {
&self.notification_hub_region
}
pub fn status_summary(mut self, input: crate::types::NotificationHubStatusSummary) -> Self {
self.status_summary = ::std::option::Option::Some(input);
self
}
pub fn set_status_summary(mut self, input: ::std::option::Option<crate::types::NotificationHubStatusSummary>) -> Self {
self.status_summary = input;
self
}
pub fn get_status_summary(&self) -> &::std::option::Option<crate::types::NotificationHubStatusSummary> {
&self.status_summary
}
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::deregister_notification_hub::DeregisterNotificationHubOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::deregister_notification_hub::DeregisterNotificationHubOutput {
notification_hub_region: self.notification_hub_region.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"notification_hub_region",
"notification_hub_region was not specified but it is required when building DeregisterNotificationHubOutput",
)
})?,
status_summary: self.status_summary,
_request_id: self._request_id,
})
}
}