pub struct Builder { /* private fields */ }Expand description
A builder for GetConnectionsOutput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn connections(self, input: Connection) -> Self
pub fn connections(self, input: Connection) -> Self
Appends an item to connections.
To override the contents of this collection use set_connections.
Information about the connections.
sourcepub fn set_connections(self, input: Option<Vec<Connection>>) -> Self
pub fn set_connections(self, input: Option<Vec<Connection>>) -> Self
Information about the connections.
Examples found in repository?
src/json_deser.rs (lines 2083-2085)
2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117
pub(crate) fn deser_operation_crate_operation_get_connections(
value: &[u8],
mut builder: crate::output::get_connections_output::Builder,
) -> Result<
crate::output::get_connections_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Connections" => {
builder = builder.set_connections(
crate::json_deser::deser_list_com_amazonaws_networkmanager_connection_list(tokens)?
);
}
"NextToken" => {
builder = builder.set_next_token(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}sourcepub fn next_token(self, input: impl Into<String>) -> Self
pub fn next_token(self, input: impl Into<String>) -> Self
The token to use for the next page of results.
sourcepub fn set_next_token(self, input: Option<String>) -> Self
pub fn set_next_token(self, input: Option<String>) -> Self
The token to use for the next page of results.
Examples found in repository?
src/json_deser.rs (lines 2088-2094)
2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117
pub(crate) fn deser_operation_crate_operation_get_connections(
value: &[u8],
mut builder: crate::output::get_connections_output::Builder,
) -> Result<
crate::output::get_connections_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Connections" => {
builder = builder.set_connections(
crate::json_deser::deser_list_com_amazonaws_networkmanager_connection_list(tokens)?
);
}
"NextToken" => {
builder = builder.set_next_token(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}sourcepub fn build(self) -> GetConnectionsOutput
pub fn build(self) -> GetConnectionsOutput
Consumes the builder and constructs a GetConnectionsOutput.
Examples found in repository?
src/operation_deser.rs (line 5578)
5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580
pub fn parse_get_connections_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetConnectionsOutput, crate::error::GetConnectionsError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_connections_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_get_connections(
response.body().as_ref(),
output,
)
.map_err(crate::error::GetConnectionsError::unhandled)?;
output.build()
})
}