aws-sdk-securityagent 1.4.0

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

/// <p>Output for the UpdateTargetDomain operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateTargetDomainOutput {
    /// <p>The unique identifier of the target domain.</p>
    pub target_domain_id: ::std::string::String,
    /// <p>The domain name of the target domain.</p>
    pub domain_name: ::std::string::String,
    /// <p>The current verification status of the target domain.</p>
    pub verification_status: crate::types::TargetDomainStatus,
    /// <p>The reason for the current target domain verification status.</p>
    pub verification_status_reason: ::std::option::Option<::std::string::String>,
    /// <p>The updated verification details for the target domain.</p>
    pub verification_details: ::std::option::Option<crate::types::VerificationDetails>,
    /// <p>The date and time the target domain was created, in UTC format.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time the target domain was verified, in UTC format.</p>
    pub verified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdateTargetDomainOutput {
    /// <p>The unique identifier of the target domain.</p>
    pub fn target_domain_id(&self) -> &str {
        use std::ops::Deref;
        self.target_domain_id.deref()
    }
    /// <p>The domain name of the target domain.</p>
    pub fn domain_name(&self) -> &str {
        use std::ops::Deref;
        self.domain_name.deref()
    }
    /// <p>The current verification status of the target domain.</p>
    pub fn verification_status(&self) -> &crate::types::TargetDomainStatus {
        &self.verification_status
    }
    /// <p>The reason for the current target domain verification status.</p>
    pub fn verification_status_reason(&self) -> ::std::option::Option<&str> {
        self.verification_status_reason.as_deref()
    }
    /// <p>The updated verification details for the target domain.</p>
    pub fn verification_details(&self) -> ::std::option::Option<&crate::types::VerificationDetails> {
        self.verification_details.as_ref()
    }
    /// <p>The date and time the target domain was created, in UTC format.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The date and time the target domain was verified, in UTC format.</p>
    pub fn verified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.verified_at.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateTargetDomainOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateTargetDomainOutput {
    /// Creates a new builder-style object to manufacture [`UpdateTargetDomainOutput`](crate::operation::update_target_domain::UpdateTargetDomainOutput).
    pub fn builder() -> crate::operation::update_target_domain::builders::UpdateTargetDomainOutputBuilder {
        crate::operation::update_target_domain::builders::UpdateTargetDomainOutputBuilder::default()
    }
}

/// A builder for [`UpdateTargetDomainOutput`](crate::operation::update_target_domain::UpdateTargetDomainOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTargetDomainOutputBuilder {
    pub(crate) target_domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) verification_status: ::std::option::Option<crate::types::TargetDomainStatus>,
    pub(crate) verification_status_reason: ::std::option::Option<::std::string::String>,
    pub(crate) verification_details: ::std::option::Option<crate::types::VerificationDetails>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) verified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdateTargetDomainOutputBuilder {
    /// <p>The unique identifier of the target domain.</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.</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.</p>
    pub fn get_target_domain_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_domain_id
    }
    /// <p>The domain name of the target domain.</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The domain name of the target domain.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The domain name of the target domain.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The current verification status of the target domain.</p>
    /// This field is required.
    pub fn verification_status(mut self, input: crate::types::TargetDomainStatus) -> Self {
        self.verification_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current verification status of the target domain.</p>
    pub fn set_verification_status(mut self, input: ::std::option::Option<crate::types::TargetDomainStatus>) -> Self {
        self.verification_status = input;
        self
    }
    /// <p>The current verification status of the target domain.</p>
    pub fn get_verification_status(&self) -> &::std::option::Option<crate::types::TargetDomainStatus> {
        &self.verification_status
    }
    /// <p>The reason for the current target domain verification status.</p>
    pub fn verification_status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.verification_status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason for the current target domain verification status.</p>
    pub fn set_verification_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.verification_status_reason = input;
        self
    }
    /// <p>The reason for the current target domain verification status.</p>
    pub fn get_verification_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.verification_status_reason
    }
    /// <p>The updated verification details for the target domain.</p>
    pub fn verification_details(mut self, input: crate::types::VerificationDetails) -> Self {
        self.verification_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated verification details for the target domain.</p>
    pub fn set_verification_details(mut self, input: ::std::option::Option<crate::types::VerificationDetails>) -> Self {
        self.verification_details = input;
        self
    }
    /// <p>The updated verification details for the target domain.</p>
    pub fn get_verification_details(&self) -> &::std::option::Option<crate::types::VerificationDetails> {
        &self.verification_details
    }
    /// <p>The date and time the target domain was created, in UTC format.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the target domain was created, in UTC format.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time the target domain was created, in UTC format.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The date and time the target domain was verified, in UTC format.</p>
    pub fn verified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.verified_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the target domain was verified, in UTC format.</p>
    pub fn set_verified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.verified_at = input;
        self
    }
    /// <p>The date and time the target domain was verified, in UTC format.</p>
    pub fn get_verified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.verified_at
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`UpdateTargetDomainOutput`](crate::operation::update_target_domain::UpdateTargetDomainOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`target_domain_id`](crate::operation::update_target_domain::builders::UpdateTargetDomainOutputBuilder::target_domain_id)
    /// - [`domain_name`](crate::operation::update_target_domain::builders::UpdateTargetDomainOutputBuilder::domain_name)
    /// - [`verification_status`](crate::operation::update_target_domain::builders::UpdateTargetDomainOutputBuilder::verification_status)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_target_domain::UpdateTargetDomainOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_target_domain::UpdateTargetDomainOutput {
            target_domain_id: self.target_domain_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "target_domain_id",
                    "target_domain_id was not specified but it is required when building UpdateTargetDomainOutput",
                )
            })?,
            domain_name: self.domain_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "domain_name",
                    "domain_name was not specified but it is required when building UpdateTargetDomainOutput",
                )
            })?,
            verification_status: self.verification_status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "verification_status",
                    "verification_status was not specified but it is required when building UpdateTargetDomainOutput",
                )
            })?,
            verification_status_reason: self.verification_status_reason,
            verification_details: self.verification_details,
            created_at: self.created_at,
            verified_at: self.verified_at,
            _request_id: self._request_id,
        })
    }
}