aws_sdk_ses/operation/verify_domain_identity/
_verify_domain_identity_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents a request to begin Amazon SES domain verification and to generate the TXT records that you must publish to the DNS server of your domain to complete the verification. For information about domain verification, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#verify-domain-procedure">Amazon SES Developer Guide</a>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct VerifyDomainIdentityInput {
7    /// <p>The domain to be verified.</p>
8    pub domain: ::std::option::Option<::std::string::String>,
9}
10impl VerifyDomainIdentityInput {
11    /// <p>The domain to be verified.</p>
12    pub fn domain(&self) -> ::std::option::Option<&str> {
13        self.domain.as_deref()
14    }
15}
16impl VerifyDomainIdentityInput {
17    /// Creates a new builder-style object to manufacture [`VerifyDomainIdentityInput`](crate::operation::verify_domain_identity::VerifyDomainIdentityInput).
18    pub fn builder() -> crate::operation::verify_domain_identity::builders::VerifyDomainIdentityInputBuilder {
19        crate::operation::verify_domain_identity::builders::VerifyDomainIdentityInputBuilder::default()
20    }
21}
22
23/// A builder for [`VerifyDomainIdentityInput`](crate::operation::verify_domain_identity::VerifyDomainIdentityInput).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct VerifyDomainIdentityInputBuilder {
27    pub(crate) domain: ::std::option::Option<::std::string::String>,
28}
29impl VerifyDomainIdentityInputBuilder {
30    /// <p>The domain to be verified.</p>
31    /// This field is required.
32    pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
33        self.domain = ::std::option::Option::Some(input.into());
34        self
35    }
36    /// <p>The domain to be verified.</p>
37    pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
38        self.domain = input;
39        self
40    }
41    /// <p>The domain to be verified.</p>
42    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
43        &self.domain
44    }
45    /// Consumes the builder and constructs a [`VerifyDomainIdentityInput`](crate::operation::verify_domain_identity::VerifyDomainIdentityInput).
46    pub fn build(
47        self,
48    ) -> ::std::result::Result<crate::operation::verify_domain_identity::VerifyDomainIdentityInput, ::aws_smithy_types::error::operation::BuildError>
49    {
50        ::std::result::Result::Ok(crate::operation::verify_domain_identity::VerifyDomainIdentityInput { domain: self.domain })
51    }
52}