aws-sdk-directory 1.107.0

AWS SDK for AWS Directory Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateTrustInput {
    /// <p>Identifier of the trust relationship.</p>
    pub trust_id: ::std::option::Option<::std::string::String>,
    /// <p>Updates selective authentication for the trust.</p>
    pub selective_auth: ::std::option::Option<crate::types::SelectiveAuth>,
}
impl UpdateTrustInput {
    /// <p>Identifier of the trust relationship.</p>
    pub fn trust_id(&self) -> ::std::option::Option<&str> {
        self.trust_id.as_deref()
    }
    /// <p>Updates selective authentication for the trust.</p>
    pub fn selective_auth(&self) -> ::std::option::Option<&crate::types::SelectiveAuth> {
        self.selective_auth.as_ref()
    }
}
impl UpdateTrustInput {
    /// Creates a new builder-style object to manufacture [`UpdateTrustInput`](crate::operation::update_trust::UpdateTrustInput).
    pub fn builder() -> crate::operation::update_trust::builders::UpdateTrustInputBuilder {
        crate::operation::update_trust::builders::UpdateTrustInputBuilder::default()
    }
}

/// A builder for [`UpdateTrustInput`](crate::operation::update_trust::UpdateTrustInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTrustInputBuilder {
    pub(crate) trust_id: ::std::option::Option<::std::string::String>,
    pub(crate) selective_auth: ::std::option::Option<crate::types::SelectiveAuth>,
}
impl UpdateTrustInputBuilder {
    /// <p>Identifier of the trust relationship.</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>Identifier of the trust relationship.</p>
    pub fn set_trust_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.trust_id = input;
        self
    }
    /// <p>Identifier of the trust relationship.</p>
    pub fn get_trust_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.trust_id
    }
    /// <p>Updates selective authentication for the trust.</p>
    pub fn selective_auth(mut self, input: crate::types::SelectiveAuth) -> Self {
        self.selective_auth = ::std::option::Option::Some(input);
        self
    }
    /// <p>Updates selective authentication for the trust.</p>
    pub fn set_selective_auth(mut self, input: ::std::option::Option<crate::types::SelectiveAuth>) -> Self {
        self.selective_auth = input;
        self
    }
    /// <p>Updates selective authentication for the trust.</p>
    pub fn get_selective_auth(&self) -> &::std::option::Option<crate::types::SelectiveAuth> {
        &self.selective_auth
    }
    /// Consumes the builder and constructs a [`UpdateTrustInput`](crate::operation::update_trust::UpdateTrustInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_trust::UpdateTrustInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_trust::UpdateTrustInput {
            trust_id: self.trust_id,
            selective_auth: self.selective_auth,
        })
    }
}