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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The set of DHCP options.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DhcpOptions {
    /// <p>The DHCP options in the set.</p>
    pub dhcp_configurations: ::std::option::Option<::std::vec::Vec<crate::types::DhcpConfiguration>>,
    /// <p>The ID of the set of DHCP options.</p>
    pub dhcp_options_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the DHCP options set.</p>
    pub owner_id: ::std::option::Option<::std::string::String>,
    /// <p>Any tags assigned to the DHCP options set.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl DhcpOptions {
    /// <p>The DHCP options in the set.</p>
    pub fn dhcp_configurations(&self) -> ::std::option::Option<&[crate::types::DhcpConfiguration]> {
        self.dhcp_configurations.as_deref()
    }
    /// <p>The ID of the set of DHCP options.</p>
    pub fn dhcp_options_id(&self) -> ::std::option::Option<&str> {
        self.dhcp_options_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the DHCP options set.</p>
    pub fn owner_id(&self) -> ::std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>Any tags assigned to the DHCP options set.</p>
    pub fn tags(&self) -> ::std::option::Option<&[crate::types::Tag]> {
        self.tags.as_deref()
    }
}
impl DhcpOptions {
    /// Creates a new builder-style object to manufacture [`DhcpOptions`](crate::types::DhcpOptions).
    pub fn builder() -> crate::types::builders::DhcpOptionsBuilder {
        crate::types::builders::DhcpOptionsBuilder::default()
    }
}

/// A builder for [`DhcpOptions`](crate::types::DhcpOptions).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DhcpOptionsBuilder {
    pub(crate) dhcp_configurations: ::std::option::Option<::std::vec::Vec<crate::types::DhcpConfiguration>>,
    pub(crate) dhcp_options_id: ::std::option::Option<::std::string::String>,
    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl DhcpOptionsBuilder {
    /// Appends an item to `dhcp_configurations`.
    ///
    /// To override the contents of this collection use [`set_dhcp_configurations`](Self::set_dhcp_configurations).
    ///
    /// <p>The DHCP options in the set.</p>
    pub fn dhcp_configurations(mut self, input: crate::types::DhcpConfiguration) -> Self {
        let mut v = self.dhcp_configurations.unwrap_or_default();
        v.push(input);
        self.dhcp_configurations = ::std::option::Option::Some(v);
        self
    }
    /// <p>The DHCP options in the set.</p>
    pub fn set_dhcp_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DhcpConfiguration>>) -> Self {
        self.dhcp_configurations = input;
        self
    }
    /// <p>The DHCP options in the set.</p>
    pub fn get_dhcp_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DhcpConfiguration>> {
        &self.dhcp_configurations
    }
    /// <p>The ID of the set of DHCP options.</p>
    pub fn dhcp_options_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dhcp_options_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the set of DHCP options.</p>
    pub fn set_dhcp_options_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dhcp_options_id = input;
        self
    }
    /// <p>The ID of the set of DHCP options.</p>
    pub fn get_dhcp_options_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.dhcp_options_id
    }
    /// <p>The ID of the Amazon Web Services account that owns the DHCP options set.</p>
    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the DHCP options set.</p>
    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the DHCP options set.</p>
    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_id
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Any tags assigned to the DHCP options set.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>Any tags assigned to the DHCP options set.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Any tags assigned to the DHCP options set.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`DhcpOptions`](crate::types::DhcpOptions).
    pub fn build(self) -> crate::types::DhcpOptions {
        crate::types::DhcpOptions {
            dhcp_configurations: self.dhcp_configurations,
            dhcp_options_id: self.dhcp_options_id,
            owner_id: self.owner_id,
            tags: self.tags,
        }
    }
}