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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// 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 DescribeConnectionProposalOutput {
/// <p>The bandwidth of the proposed <code>Connection</code>.</p>
pub bandwidth: ::std::string::String,
/// <p>The identifier of the <code>Environment</code> upon which the <code>Connection</code> would be placed if this proposal were accepted.</p>
pub environment_id: ::std::string::String,
/// <p>The partner provider of the specific <code>Environment</code> of the proposal.</p>
pub provider: ::std::option::Option<crate::types::Provider>,
/// <p>The partner specific location distinguisher of the specific <code>Environment</code> of the proposal.</p>
pub location: ::std::string::String,
_request_id: Option<String>,
}
impl DescribeConnectionProposalOutput {
/// <p>The bandwidth of the proposed <code>Connection</code>.</p>
pub fn bandwidth(&self) -> &str {
use std::ops::Deref;
self.bandwidth.deref()
}
/// <p>The identifier of the <code>Environment</code> upon which the <code>Connection</code> would be placed if this proposal were accepted.</p>
pub fn environment_id(&self) -> &str {
use std::ops::Deref;
self.environment_id.deref()
}
/// <p>The partner provider of the specific <code>Environment</code> of the proposal.</p>
pub fn provider(&self) -> ::std::option::Option<&crate::types::Provider> {
self.provider.as_ref()
}
/// <p>The partner specific location distinguisher of the specific <code>Environment</code> of the proposal.</p>
pub fn location(&self) -> &str {
use std::ops::Deref;
self.location.deref()
}
}
impl ::aws_types::request_id::RequestId for DescribeConnectionProposalOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeConnectionProposalOutput {
/// Creates a new builder-style object to manufacture [`DescribeConnectionProposalOutput`](crate::operation::describe_connection_proposal::DescribeConnectionProposalOutput).
pub fn builder() -> crate::operation::describe_connection_proposal::builders::DescribeConnectionProposalOutputBuilder {
crate::operation::describe_connection_proposal::builders::DescribeConnectionProposalOutputBuilder::default()
}
}
/// A builder for [`DescribeConnectionProposalOutput`](crate::operation::describe_connection_proposal::DescribeConnectionProposalOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeConnectionProposalOutputBuilder {
pub(crate) bandwidth: ::std::option::Option<::std::string::String>,
pub(crate) environment_id: ::std::option::Option<::std::string::String>,
pub(crate) provider: ::std::option::Option<crate::types::Provider>,
pub(crate) location: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DescribeConnectionProposalOutputBuilder {
/// <p>The bandwidth of the proposed <code>Connection</code>.</p>
/// This field is required.
pub fn bandwidth(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bandwidth = ::std::option::Option::Some(input.into());
self
}
/// <p>The bandwidth of the proposed <code>Connection</code>.</p>
pub fn set_bandwidth(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bandwidth = input;
self
}
/// <p>The bandwidth of the proposed <code>Connection</code>.</p>
pub fn get_bandwidth(&self) -> &::std::option::Option<::std::string::String> {
&self.bandwidth
}
/// <p>The identifier of the <code>Environment</code> upon which the <code>Connection</code> would be placed if this proposal were accepted.</p>
/// This field is required.
pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the <code>Environment</code> upon which the <code>Connection</code> would be placed if this proposal were accepted.</p>
pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_id = input;
self
}
/// <p>The identifier of the <code>Environment</code> upon which the <code>Connection</code> would be placed if this proposal were accepted.</p>
pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_id
}
/// <p>The partner provider of the specific <code>Environment</code> of the proposal.</p>
/// This field is required.
pub fn provider(mut self, input: crate::types::Provider) -> Self {
self.provider = ::std::option::Option::Some(input);
self
}
/// <p>The partner provider of the specific <code>Environment</code> of the proposal.</p>
pub fn set_provider(mut self, input: ::std::option::Option<crate::types::Provider>) -> Self {
self.provider = input;
self
}
/// <p>The partner provider of the specific <code>Environment</code> of the proposal.</p>
pub fn get_provider(&self) -> &::std::option::Option<crate::types::Provider> {
&self.provider
}
/// <p>The partner specific location distinguisher of the specific <code>Environment</code> of the proposal.</p>
/// This field is required.
pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.location = ::std::option::Option::Some(input.into());
self
}
/// <p>The partner specific location distinguisher of the specific <code>Environment</code> of the proposal.</p>
pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.location = input;
self
}
/// <p>The partner specific location distinguisher of the specific <code>Environment</code> of the proposal.</p>
pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
&self.location
}
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 [`DescribeConnectionProposalOutput`](crate::operation::describe_connection_proposal::DescribeConnectionProposalOutput).
/// This method will fail if any of the following fields are not set:
/// - [`bandwidth`](crate::operation::describe_connection_proposal::builders::DescribeConnectionProposalOutputBuilder::bandwidth)
/// - [`environment_id`](crate::operation::describe_connection_proposal::builders::DescribeConnectionProposalOutputBuilder::environment_id)
/// - [`location`](crate::operation::describe_connection_proposal::builders::DescribeConnectionProposalOutputBuilder::location)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::describe_connection_proposal::DescribeConnectionProposalOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::describe_connection_proposal::DescribeConnectionProposalOutput {
bandwidth: self.bandwidth.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"bandwidth",
"bandwidth was not specified but it is required when building DescribeConnectionProposalOutput",
)
})?,
environment_id: self.environment_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"environment_id",
"environment_id was not specified but it is required when building DescribeConnectionProposalOutput",
)
})?,
provider: self.provider,
location: self.location.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"location",
"location was not specified but it is required when building DescribeConnectionProposalOutput",
)
})?,
_request_id: self._request_id,
})
}
}