aws_sdk_datazone/operation/revoke_subscription/
_revoke_subscription_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RevokeSubscriptionInput {
pub domain_identifier: ::std::option::Option<::std::string::String>,
pub identifier: ::std::option::Option<::std::string::String>,
pub retain_permissions: ::std::option::Option<bool>,
}
impl RevokeSubscriptionInput {
pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
self.domain_identifier.as_deref()
}
pub fn identifier(&self) -> ::std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn retain_permissions(&self) -> ::std::option::Option<bool> {
self.retain_permissions
}
}
impl RevokeSubscriptionInput {
pub fn builder() -> crate::operation::revoke_subscription::builders::RevokeSubscriptionInputBuilder {
crate::operation::revoke_subscription::builders::RevokeSubscriptionInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RevokeSubscriptionInputBuilder {
pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
pub(crate) identifier: ::std::option::Option<::std::string::String>,
pub(crate) retain_permissions: ::std::option::Option<bool>,
}
impl RevokeSubscriptionInputBuilder {
pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_identifier = input;
self
}
pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_identifier
}
pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.identifier
}
pub fn retain_permissions(mut self, input: bool) -> Self {
self.retain_permissions = ::std::option::Option::Some(input);
self
}
pub fn set_retain_permissions(mut self, input: ::std::option::Option<bool>) -> Self {
self.retain_permissions = input;
self
}
pub fn get_retain_permissions(&self) -> &::std::option::Option<bool> {
&self.retain_permissions
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::revoke_subscription::RevokeSubscriptionInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::revoke_subscription::RevokeSubscriptionInput {
domain_identifier: self.domain_identifier,
identifier: self.identifier,
retain_permissions: self.retain_permissions,
})
}
}