1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object that contains information about the start of authority (SOA) record associated with the identity.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SoaRecord {
    /// <p>Primary name server specified in the SOA record.</p>
    pub primary_name_server: ::std::option::Option<::std::string::String>,
    /// <p>Administrative contact email from the SOA record.</p>
    pub admin_email: ::std::option::Option<::std::string::String>,
    /// <p>Serial number from the SOA record.</p>
    pub serial_number: i64,
}
impl SoaRecord {
    /// <p>Primary name server specified in the SOA record.</p>
    pub fn primary_name_server(&self) -> ::std::option::Option<&str> {
        self.primary_name_server.as_deref()
    }
    /// <p>Administrative contact email from the SOA record.</p>
    pub fn admin_email(&self) -> ::std::option::Option<&str> {
        self.admin_email.as_deref()
    }
    /// <p>Serial number from the SOA record.</p>
    pub fn serial_number(&self) -> i64 {
        self.serial_number
    }
}
impl SoaRecord {
    /// Creates a new builder-style object to manufacture [`SoaRecord`](crate::types::SoaRecord).
    pub fn builder() -> crate::types::builders::SoaRecordBuilder {
        crate::types::builders::SoaRecordBuilder::default()
    }
}

/// A builder for [`SoaRecord`](crate::types::SoaRecord).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SoaRecordBuilder {
    pub(crate) primary_name_server: ::std::option::Option<::std::string::String>,
    pub(crate) admin_email: ::std::option::Option<::std::string::String>,
    pub(crate) serial_number: ::std::option::Option<i64>,
}
impl SoaRecordBuilder {
    /// <p>Primary name server specified in the SOA record.</p>
    pub fn primary_name_server(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.primary_name_server = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Primary name server specified in the SOA record.</p>
    pub fn set_primary_name_server(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.primary_name_server = input;
        self
    }
    /// <p>Primary name server specified in the SOA record.</p>
    pub fn get_primary_name_server(&self) -> &::std::option::Option<::std::string::String> {
        &self.primary_name_server
    }
    /// <p>Administrative contact email from the SOA record.</p>
    pub fn admin_email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.admin_email = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Administrative contact email from the SOA record.</p>
    pub fn set_admin_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.admin_email = input;
        self
    }
    /// <p>Administrative contact email from the SOA record.</p>
    pub fn get_admin_email(&self) -> &::std::option::Option<::std::string::String> {
        &self.admin_email
    }
    /// <p>Serial number from the SOA record.</p>
    pub fn serial_number(mut self, input: i64) -> Self {
        self.serial_number = ::std::option::Option::Some(input);
        self
    }
    /// <p>Serial number from the SOA record.</p>
    pub fn set_serial_number(mut self, input: ::std::option::Option<i64>) -> Self {
        self.serial_number = input;
        self
    }
    /// <p>Serial number from the SOA record.</p>
    pub fn get_serial_number(&self) -> &::std::option::Option<i64> {
        &self.serial_number
    }
    /// Consumes the builder and constructs a [`SoaRecord`](crate::types::SoaRecord).
    pub fn build(self) -> crate::types::SoaRecord {
        crate::types::SoaRecord {
            primary_name_server: self.primary_name_server,
            admin_email: self.admin_email,
            serial_number: self.serial_number.unwrap_or_default(),
        }
    }
}