#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DetachThingPrincipalInput {
pub thing_name: ::std::option::Option<::std::string::String>,
pub principal: ::std::option::Option<::std::string::String>,
}
impl DetachThingPrincipalInput {
pub fn thing_name(&self) -> ::std::option::Option<&str> {
self.thing_name.as_deref()
}
pub fn principal(&self) -> ::std::option::Option<&str> {
self.principal.as_deref()
}
}
impl DetachThingPrincipalInput {
pub fn builder() -> crate::operation::detach_thing_principal::builders::DetachThingPrincipalInputBuilder {
crate::operation::detach_thing_principal::builders::DetachThingPrincipalInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DetachThingPrincipalInputBuilder {
pub(crate) thing_name: ::std::option::Option<::std::string::String>,
pub(crate) principal: ::std::option::Option<::std::string::String>,
}
impl DetachThingPrincipalInputBuilder {
pub fn thing_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.thing_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_thing_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.thing_name = input;
self
}
pub fn get_thing_name(&self) -> &::std::option::Option<::std::string::String> {
&self.thing_name
}
pub fn principal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.principal = ::std::option::Option::Some(input.into());
self
}
pub fn set_principal(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.principal = input;
self
}
pub fn get_principal(&self) -> &::std::option::Option<::std::string::String> {
&self.principal
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::detach_thing_principal::DetachThingPrincipalInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::detach_thing_principal::DetachThingPrincipalInput {
thing_name: self.thing_name,
principal: self.principal,
})
}
}