aws_sdk_networkmanager/types/
_core_network_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Returns summary information about a core network.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CoreNetworkSummary {
7    /// <p>The ID of a core network.</p>
8    pub core_network_id: ::std::option::Option<::std::string::String>,
9    /// <p>a core network ARN.</p>
10    pub core_network_arn: ::std::option::Option<::std::string::String>,
11    /// <p>The global network ID.</p>
12    pub global_network_id: ::std::option::Option<::std::string::String>,
13    /// <p>The ID of the account owner.</p>
14    pub owner_account_id: ::std::option::Option<::std::string::String>,
15    /// <p>The state of a core network.</p>
16    pub state: ::std::option::Option<crate::types::CoreNetworkState>,
17    /// <p>The description of a core network.</p>
18    pub description: ::std::option::Option<::std::string::String>,
19    /// <p>The key-value tags associated with a core network summary.</p>
20    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
21}
22impl CoreNetworkSummary {
23    /// <p>The ID of a core network.</p>
24    pub fn core_network_id(&self) -> ::std::option::Option<&str> {
25        self.core_network_id.as_deref()
26    }
27    /// <p>a core network ARN.</p>
28    pub fn core_network_arn(&self) -> ::std::option::Option<&str> {
29        self.core_network_arn.as_deref()
30    }
31    /// <p>The global network ID.</p>
32    pub fn global_network_id(&self) -> ::std::option::Option<&str> {
33        self.global_network_id.as_deref()
34    }
35    /// <p>The ID of the account owner.</p>
36    pub fn owner_account_id(&self) -> ::std::option::Option<&str> {
37        self.owner_account_id.as_deref()
38    }
39    /// <p>The state of a core network.</p>
40    pub fn state(&self) -> ::std::option::Option<&crate::types::CoreNetworkState> {
41        self.state.as_ref()
42    }
43    /// <p>The description of a core network.</p>
44    pub fn description(&self) -> ::std::option::Option<&str> {
45        self.description.as_deref()
46    }
47    /// <p>The key-value tags associated with a core network summary.</p>
48    ///
49    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
50    pub fn tags(&self) -> &[crate::types::Tag] {
51        self.tags.as_deref().unwrap_or_default()
52    }
53}
54impl CoreNetworkSummary {
55    /// Creates a new builder-style object to manufacture [`CoreNetworkSummary`](crate::types::CoreNetworkSummary).
56    pub fn builder() -> crate::types::builders::CoreNetworkSummaryBuilder {
57        crate::types::builders::CoreNetworkSummaryBuilder::default()
58    }
59}
60
61/// A builder for [`CoreNetworkSummary`](crate::types::CoreNetworkSummary).
62#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
63#[non_exhaustive]
64pub struct CoreNetworkSummaryBuilder {
65    pub(crate) core_network_id: ::std::option::Option<::std::string::String>,
66    pub(crate) core_network_arn: ::std::option::Option<::std::string::String>,
67    pub(crate) global_network_id: ::std::option::Option<::std::string::String>,
68    pub(crate) owner_account_id: ::std::option::Option<::std::string::String>,
69    pub(crate) state: ::std::option::Option<crate::types::CoreNetworkState>,
70    pub(crate) description: ::std::option::Option<::std::string::String>,
71    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
72}
73impl CoreNetworkSummaryBuilder {
74    /// <p>The ID of a core network.</p>
75    pub fn core_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.core_network_id = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The ID of a core network.</p>
80    pub fn set_core_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.core_network_id = input;
82        self
83    }
84    /// <p>The ID of a core network.</p>
85    pub fn get_core_network_id(&self) -> &::std::option::Option<::std::string::String> {
86        &self.core_network_id
87    }
88    /// <p>a core network ARN.</p>
89    pub fn core_network_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.core_network_arn = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>a core network ARN.</p>
94    pub fn set_core_network_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.core_network_arn = input;
96        self
97    }
98    /// <p>a core network ARN.</p>
99    pub fn get_core_network_arn(&self) -> &::std::option::Option<::std::string::String> {
100        &self.core_network_arn
101    }
102    /// <p>The global network ID.</p>
103    pub fn global_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.global_network_id = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The global network ID.</p>
108    pub fn set_global_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.global_network_id = input;
110        self
111    }
112    /// <p>The global network ID.</p>
113    pub fn get_global_network_id(&self) -> &::std::option::Option<::std::string::String> {
114        &self.global_network_id
115    }
116    /// <p>The ID of the account owner.</p>
117    pub fn owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.owner_account_id = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The ID of the account owner.</p>
122    pub fn set_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.owner_account_id = input;
124        self
125    }
126    /// <p>The ID of the account owner.</p>
127    pub fn get_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
128        &self.owner_account_id
129    }
130    /// <p>The state of a core network.</p>
131    pub fn state(mut self, input: crate::types::CoreNetworkState) -> Self {
132        self.state = ::std::option::Option::Some(input);
133        self
134    }
135    /// <p>The state of a core network.</p>
136    pub fn set_state(mut self, input: ::std::option::Option<crate::types::CoreNetworkState>) -> Self {
137        self.state = input;
138        self
139    }
140    /// <p>The state of a core network.</p>
141    pub fn get_state(&self) -> &::std::option::Option<crate::types::CoreNetworkState> {
142        &self.state
143    }
144    /// <p>The description of a core network.</p>
145    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.description = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <p>The description of a core network.</p>
150    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.description = input;
152        self
153    }
154    /// <p>The description of a core network.</p>
155    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
156        &self.description
157    }
158    /// Appends an item to `tags`.
159    ///
160    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
161    ///
162    /// <p>The key-value tags associated with a core network summary.</p>
163    pub fn tags(mut self, input: crate::types::Tag) -> Self {
164        let mut v = self.tags.unwrap_or_default();
165        v.push(input);
166        self.tags = ::std::option::Option::Some(v);
167        self
168    }
169    /// <p>The key-value tags associated with a core network summary.</p>
170    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
171        self.tags = input;
172        self
173    }
174    /// <p>The key-value tags associated with a core network summary.</p>
175    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
176        &self.tags
177    }
178    /// Consumes the builder and constructs a [`CoreNetworkSummary`](crate::types::CoreNetworkSummary).
179    pub fn build(self) -> crate::types::CoreNetworkSummary {
180        crate::types::CoreNetworkSummary {
181            core_network_id: self.core_network_id,
182            core_network_arn: self.core_network_arn,
183            global_network_id: self.global_network_id,
184            owner_account_id: self.owner_account_id,
185            state: self.state,
186            description: self.description,
187            tags: self.tags,
188        }
189    }
190}