#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetIdentityNotificationAttributesOutput {
pub notification_attributes: ::std::collections::HashMap<::std::string::String, crate::types::IdentityNotificationAttributes>,
_request_id: Option<String>,
}
impl GetIdentityNotificationAttributesOutput {
pub fn notification_attributes(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::IdentityNotificationAttributes> {
&self.notification_attributes
}
}
impl ::aws_types::request_id::RequestId for GetIdentityNotificationAttributesOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetIdentityNotificationAttributesOutput {
pub fn builder() -> crate::operation::get_identity_notification_attributes::builders::GetIdentityNotificationAttributesOutputBuilder {
crate::operation::get_identity_notification_attributes::builders::GetIdentityNotificationAttributesOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetIdentityNotificationAttributesOutputBuilder {
pub(crate) notification_attributes:
::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::IdentityNotificationAttributes>>,
_request_id: Option<String>,
}
impl GetIdentityNotificationAttributesOutputBuilder {
pub fn notification_attributes(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: crate::types::IdentityNotificationAttributes,
) -> Self {
let mut hash_map = self.notification_attributes.unwrap_or_default();
hash_map.insert(k.into(), v);
self.notification_attributes = ::std::option::Option::Some(hash_map);
self
}
pub fn set_notification_attributes(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::IdentityNotificationAttributes>>,
) -> Self {
self.notification_attributes = input;
self
}
pub fn get_notification_attributes(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::IdentityNotificationAttributes>> {
&self.notification_attributes
}
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_identity_notification_attributes::GetIdentityNotificationAttributesOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(
crate::operation::get_identity_notification_attributes::GetIdentityNotificationAttributesOutput {
notification_attributes: self.notification_attributes.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"notification_attributes",
"notification_attributes was not specified but it is required when building GetIdentityNotificationAttributesOutput",
)
})?,
_request_id: self._request_id,
},
)
}
}