Skip to main content

aws_sdk_sesv2/types/
_soa_record.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>An object that contains information about the start of authority (SOA) record associated with the identity.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SoaRecord {
7    /// <p>Primary name server specified in the SOA record.</p>
8    pub primary_name_server: ::std::option::Option<::std::string::String>,
9    /// <p>Administrative contact email from the SOA record.</p>
10    pub admin_email: ::std::option::Option<::std::string::String>,
11    /// <p>Serial number from the SOA record.</p>
12    pub serial_number: i64,
13}
14impl SoaRecord {
15    /// <p>Primary name server specified in the SOA record.</p>
16    pub fn primary_name_server(&self) -> ::std::option::Option<&str> {
17        self.primary_name_server.as_deref()
18    }
19    /// <p>Administrative contact email from the SOA record.</p>
20    pub fn admin_email(&self) -> ::std::option::Option<&str> {
21        self.admin_email.as_deref()
22    }
23    /// <p>Serial number from the SOA record.</p>
24    pub fn serial_number(&self) -> i64 {
25        self.serial_number
26    }
27}
28impl SoaRecord {
29    /// Creates a new builder-style object to manufacture [`SoaRecord`](crate::types::SoaRecord).
30    pub fn builder() -> crate::types::builders::SoaRecordBuilder {
31        crate::types::builders::SoaRecordBuilder::default()
32    }
33}
34
35/// A builder for [`SoaRecord`](crate::types::SoaRecord).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct SoaRecordBuilder {
39    pub(crate) primary_name_server: ::std::option::Option<::std::string::String>,
40    pub(crate) admin_email: ::std::option::Option<::std::string::String>,
41    pub(crate) serial_number: ::std::option::Option<i64>,
42}
43impl SoaRecordBuilder {
44    /// <p>Primary name server specified in the SOA record.</p>
45    pub fn primary_name_server(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.primary_name_server = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>Primary name server specified in the SOA record.</p>
50    pub fn set_primary_name_server(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.primary_name_server = input;
52        self
53    }
54    /// <p>Primary name server specified in the SOA record.</p>
55    pub fn get_primary_name_server(&self) -> &::std::option::Option<::std::string::String> {
56        &self.primary_name_server
57    }
58    /// <p>Administrative contact email from the SOA record.</p>
59    pub fn admin_email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.admin_email = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>Administrative contact email from the SOA record.</p>
64    pub fn set_admin_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.admin_email = input;
66        self
67    }
68    /// <p>Administrative contact email from the SOA record.</p>
69    pub fn get_admin_email(&self) -> &::std::option::Option<::std::string::String> {
70        &self.admin_email
71    }
72    /// <p>Serial number from the SOA record.</p>
73    pub fn serial_number(mut self, input: i64) -> Self {
74        self.serial_number = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>Serial number from the SOA record.</p>
78    pub fn set_serial_number(mut self, input: ::std::option::Option<i64>) -> Self {
79        self.serial_number = input;
80        self
81    }
82    /// <p>Serial number from the SOA record.</p>
83    pub fn get_serial_number(&self) -> &::std::option::Option<i64> {
84        &self.serial_number
85    }
86    /// Consumes the builder and constructs a [`SoaRecord`](crate::types::SoaRecord).
87    pub fn build(self) -> crate::types::SoaRecord {
88        crate::types::SoaRecord {
89            primary_name_server: self.primary_name_server,
90            admin_email: self.admin_email,
91            serial_number: self.serial_number.unwrap_or_default(),
92        }
93    }
94}