aws-sdk-directory 1.16.0

AWS SDK for AWS Directory Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Deletes the local side of an existing trust relationship between the Managed Microsoft AD directory and the external domain.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteTrustInput {
    /// <p>The Trust ID of the trust relationship to be deleted.</p>
    pub trust_id: ::std::option::Option<::std::string::String>,
    /// <p>Delete a conditional forwarder as part of a DeleteTrustRequest.</p>
    pub delete_associated_conditional_forwarder: ::std::option::Option<bool>,
}
impl DeleteTrustInput {
    /// <p>The Trust ID of the trust relationship to be deleted.</p>
    pub fn trust_id(&self) -> ::std::option::Option<&str> {
        self.trust_id.as_deref()
    }
    /// <p>Delete a conditional forwarder as part of a DeleteTrustRequest.</p>
    pub fn delete_associated_conditional_forwarder(&self) -> ::std::option::Option<bool> {
        self.delete_associated_conditional_forwarder
    }
}
impl DeleteTrustInput {
    /// Creates a new builder-style object to manufacture [`DeleteTrustInput`](crate::operation::delete_trust::DeleteTrustInput).
    pub fn builder() -> crate::operation::delete_trust::builders::DeleteTrustInputBuilder {
        crate::operation::delete_trust::builders::DeleteTrustInputBuilder::default()
    }
}

/// A builder for [`DeleteTrustInput`](crate::operation::delete_trust::DeleteTrustInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DeleteTrustInputBuilder {
    pub(crate) trust_id: ::std::option::Option<::std::string::String>,
    pub(crate) delete_associated_conditional_forwarder: ::std::option::Option<bool>,
}
impl DeleteTrustInputBuilder {
    /// <p>The Trust ID of the trust relationship to be deleted.</p>
    /// This field is required.
    pub fn trust_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.trust_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Trust ID of the trust relationship to be deleted.</p>
    pub fn set_trust_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.trust_id = input;
        self
    }
    /// <p>The Trust ID of the trust relationship to be deleted.</p>
    pub fn get_trust_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.trust_id
    }
    /// <p>Delete a conditional forwarder as part of a DeleteTrustRequest.</p>
    pub fn delete_associated_conditional_forwarder(mut self, input: bool) -> Self {
        self.delete_associated_conditional_forwarder = ::std::option::Option::Some(input);
        self
    }
    /// <p>Delete a conditional forwarder as part of a DeleteTrustRequest.</p>
    pub fn set_delete_associated_conditional_forwarder(mut self, input: ::std::option::Option<bool>) -> Self {
        self.delete_associated_conditional_forwarder = input;
        self
    }
    /// <p>Delete a conditional forwarder as part of a DeleteTrustRequest.</p>
    pub fn get_delete_associated_conditional_forwarder(&self) -> &::std::option::Option<bool> {
        &self.delete_associated_conditional_forwarder
    }
    /// Consumes the builder and constructs a [`DeleteTrustInput`](crate::operation::delete_trust::DeleteTrustInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::delete_trust::DeleteTrustInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_trust::DeleteTrustInput {
            trust_id: self.trust_id,
            delete_associated_conditional_forwarder: self.delete_associated_conditional_forwarder,
        })
    }
}