aws-sdk-securityagent 1.2.0

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

/// <p>Input for updating a target domain.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateTargetDomainInput {
    /// <p>The unique identifier of the target domain to update.</p>
    pub target_domain_id: ::std::option::Option<::std::string::String>,
    /// <p>The updated verification method for the target domain.</p>
    pub verification_method: ::std::option::Option<crate::types::DomainVerificationMethod>,
}
impl UpdateTargetDomainInput {
    /// <p>The unique identifier of the target domain to update.</p>
    pub fn target_domain_id(&self) -> ::std::option::Option<&str> {
        self.target_domain_id.as_deref()
    }
    /// <p>The updated verification method for the target domain.</p>
    pub fn verification_method(&self) -> ::std::option::Option<&crate::types::DomainVerificationMethod> {
        self.verification_method.as_ref()
    }
}
impl UpdateTargetDomainInput {
    /// Creates a new builder-style object to manufacture [`UpdateTargetDomainInput`](crate::operation::update_target_domain::UpdateTargetDomainInput).
    pub fn builder() -> crate::operation::update_target_domain::builders::UpdateTargetDomainInputBuilder {
        crate::operation::update_target_domain::builders::UpdateTargetDomainInputBuilder::default()
    }
}

/// A builder for [`UpdateTargetDomainInput`](crate::operation::update_target_domain::UpdateTargetDomainInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTargetDomainInputBuilder {
    pub(crate) target_domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) verification_method: ::std::option::Option<crate::types::DomainVerificationMethod>,
}
impl UpdateTargetDomainInputBuilder {
    /// <p>The unique identifier of the target domain to update.</p>
    /// This field is required.
    pub fn target_domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_domain_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the target domain to update.</p>
    pub fn set_target_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_domain_id = input;
        self
    }
    /// <p>The unique identifier of the target domain to update.</p>
    pub fn get_target_domain_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_domain_id
    }
    /// <p>The updated verification method for the target domain.</p>
    /// This field is required.
    pub fn verification_method(mut self, input: crate::types::DomainVerificationMethod) -> Self {
        self.verification_method = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated verification method for the target domain.</p>
    pub fn set_verification_method(mut self, input: ::std::option::Option<crate::types::DomainVerificationMethod>) -> Self {
        self.verification_method = input;
        self
    }
    /// <p>The updated verification method for the target domain.</p>
    pub fn get_verification_method(&self) -> &::std::option::Option<crate::types::DomainVerificationMethod> {
        &self.verification_method
    }
    /// Consumes the builder and constructs a [`UpdateTargetDomainInput`](crate::operation::update_target_domain::UpdateTargetDomainInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_target_domain::UpdateTargetDomainInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_target_domain::UpdateTargetDomainInput {
            target_domain_id: self.target_domain_id,
            verification_method: self.verification_method,
        })
    }
}