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
129
130
131
132
133
134
135
136
// 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 DescribeCustomerMetadataOutput {
/// <p>The list of customer agreements.</p>
pub agreements: ::std::option::Option<::std::vec::Vec<crate::types::CustomerAgreement>>,
/// <p>The type of network-to-network interface (NNI) partner. The partner type will be one of the following:</p>
/// <ul>
/// <li>
/// <p>V1: This partner can only allocate 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps subgigabit connections.</p></li>
/// <li>
/// <p>V2: This partner can only allocate 1GB, 2GB, 5GB, or 10GB hosted connections.</p></li>
/// <li>
/// <p>nonPartner: The customer is not a partner.</p></li>
/// </ul>
pub nni_partner_type: ::std::option::Option<crate::types::NniPartnerType>,
_request_id: Option<String>,
}
impl DescribeCustomerMetadataOutput {
/// <p>The list of customer agreements.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.agreements.is_none()`.
pub fn agreements(&self) -> &[crate::types::CustomerAgreement] {
self.agreements.as_deref().unwrap_or_default()
}
/// <p>The type of network-to-network interface (NNI) partner. The partner type will be one of the following:</p>
/// <ul>
/// <li>
/// <p>V1: This partner can only allocate 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps subgigabit connections.</p></li>
/// <li>
/// <p>V2: This partner can only allocate 1GB, 2GB, 5GB, or 10GB hosted connections.</p></li>
/// <li>
/// <p>nonPartner: The customer is not a partner.</p></li>
/// </ul>
pub fn nni_partner_type(&self) -> ::std::option::Option<&crate::types::NniPartnerType> {
self.nni_partner_type.as_ref()
}
}
impl ::aws_types::request_id::RequestId for DescribeCustomerMetadataOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeCustomerMetadataOutput {
/// Creates a new builder-style object to manufacture [`DescribeCustomerMetadataOutput`](crate::operation::describe_customer_metadata::DescribeCustomerMetadataOutput).
pub fn builder() -> crate::operation::describe_customer_metadata::builders::DescribeCustomerMetadataOutputBuilder {
crate::operation::describe_customer_metadata::builders::DescribeCustomerMetadataOutputBuilder::default()
}
}
/// A builder for [`DescribeCustomerMetadataOutput`](crate::operation::describe_customer_metadata::DescribeCustomerMetadataOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeCustomerMetadataOutputBuilder {
pub(crate) agreements: ::std::option::Option<::std::vec::Vec<crate::types::CustomerAgreement>>,
pub(crate) nni_partner_type: ::std::option::Option<crate::types::NniPartnerType>,
_request_id: Option<String>,
}
impl DescribeCustomerMetadataOutputBuilder {
/// Appends an item to `agreements`.
///
/// To override the contents of this collection use [`set_agreements`](Self::set_agreements).
///
/// <p>The list of customer agreements.</p>
pub fn agreements(mut self, input: crate::types::CustomerAgreement) -> Self {
let mut v = self.agreements.unwrap_or_default();
v.push(input);
self.agreements = ::std::option::Option::Some(v);
self
}
/// <p>The list of customer agreements.</p>
pub fn set_agreements(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CustomerAgreement>>) -> Self {
self.agreements = input;
self
}
/// <p>The list of customer agreements.</p>
pub fn get_agreements(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CustomerAgreement>> {
&self.agreements
}
/// <p>The type of network-to-network interface (NNI) partner. The partner type will be one of the following:</p>
/// <ul>
/// <li>
/// <p>V1: This partner can only allocate 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps subgigabit connections.</p></li>
/// <li>
/// <p>V2: This partner can only allocate 1GB, 2GB, 5GB, or 10GB hosted connections.</p></li>
/// <li>
/// <p>nonPartner: The customer is not a partner.</p></li>
/// </ul>
pub fn nni_partner_type(mut self, input: crate::types::NniPartnerType) -> Self {
self.nni_partner_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of network-to-network interface (NNI) partner. The partner type will be one of the following:</p>
/// <ul>
/// <li>
/// <p>V1: This partner can only allocate 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps subgigabit connections.</p></li>
/// <li>
/// <p>V2: This partner can only allocate 1GB, 2GB, 5GB, or 10GB hosted connections.</p></li>
/// <li>
/// <p>nonPartner: The customer is not a partner.</p></li>
/// </ul>
pub fn set_nni_partner_type(mut self, input: ::std::option::Option<crate::types::NniPartnerType>) -> Self {
self.nni_partner_type = input;
self
}
/// <p>The type of network-to-network interface (NNI) partner. The partner type will be one of the following:</p>
/// <ul>
/// <li>
/// <p>V1: This partner can only allocate 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps subgigabit connections.</p></li>
/// <li>
/// <p>V2: This partner can only allocate 1GB, 2GB, 5GB, or 10GB hosted connections.</p></li>
/// <li>
/// <p>nonPartner: The customer is not a partner.</p></li>
/// </ul>
pub fn get_nni_partner_type(&self) -> &::std::option::Option<crate::types::NniPartnerType> {
&self.nni_partner_type
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`DescribeCustomerMetadataOutput`](crate::operation::describe_customer_metadata::DescribeCustomerMetadataOutput).
pub fn build(self) -> crate::operation::describe_customer_metadata::DescribeCustomerMetadataOutput {
crate::operation::describe_customer_metadata::DescribeCustomerMetadataOutput {
agreements: self.agreements,
nni_partner_type: self.nni_partner_type,
_request_id: self._request_id,
}
}
}