aws-sdk-lightsail 1.108.0

AWS SDK for Amazon Lightsail
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 CreateDomainEntryInput {
    /// <p>The domain name (<code>example.com</code>) for which you want to create the domain entry.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>An array of key-value pairs containing information about the domain entry request.</p>
    pub domain_entry: ::std::option::Option<crate::types::DomainEntry>,
}
impl CreateDomainEntryInput {
    /// <p>The domain name (<code>example.com</code>) for which you want to create the domain entry.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>An array of key-value pairs containing information about the domain entry request.</p>
    pub fn domain_entry(&self) -> ::std::option::Option<&crate::types::DomainEntry> {
        self.domain_entry.as_ref()
    }
}
impl CreateDomainEntryInput {
    /// Creates a new builder-style object to manufacture [`CreateDomainEntryInput`](crate::operation::create_domain_entry::CreateDomainEntryInput).
    pub fn builder() -> crate::operation::create_domain_entry::builders::CreateDomainEntryInputBuilder {
        crate::operation::create_domain_entry::builders::CreateDomainEntryInputBuilder::default()
    }
}

/// A builder for [`CreateDomainEntryInput`](crate::operation::create_domain_entry::CreateDomainEntryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDomainEntryInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) domain_entry: ::std::option::Option<crate::types::DomainEntry>,
}
impl CreateDomainEntryInputBuilder {
    /// <p>The domain name (<code>example.com</code>) for which you want to create the domain entry.</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 (<code>example.com</code>) for which you want to create the domain entry.</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 (<code>example.com</code>) for which you want to create the domain entry.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>An array of key-value pairs containing information about the domain entry request.</p>
    /// This field is required.
    pub fn domain_entry(mut self, input: crate::types::DomainEntry) -> Self {
        self.domain_entry = ::std::option::Option::Some(input);
        self
    }
    /// <p>An array of key-value pairs containing information about the domain entry request.</p>
    pub fn set_domain_entry(mut self, input: ::std::option::Option<crate::types::DomainEntry>) -> Self {
        self.domain_entry = input;
        self
    }
    /// <p>An array of key-value pairs containing information about the domain entry request.</p>
    pub fn get_domain_entry(&self) -> &::std::option::Option<crate::types::DomainEntry> {
        &self.domain_entry
    }
    /// Consumes the builder and constructs a [`CreateDomainEntryInput`](crate::operation::create_domain_entry::CreateDomainEntryInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_domain_entry::CreateDomainEntryInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_domain_entry::CreateDomainEntryInput {
            domain_name: self.domain_name,
            domain_entry: self.domain_entry,
        })
    }
}