pub struct Builder { /* private fields */ }
Expand description
A builder for CreateConnectionOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn connection_arn(self, input: impl Into<String>) -> Self
pub fn connection_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the connection to be created. The ARN is used as the connection reference when the connection is shared between AWS services.
The ARN is never reused if the connection is deleted.
sourcepub fn set_connection_arn(self, input: Option<String>) -> Self
pub fn set_connection_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the connection to be created. The ARN is used as the connection reference when the connection is shared between AWS services.
The ARN is never reused if the connection is deleted.
Examples found in repository?
src/json_deser.rs (lines 173-179)
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
pub(crate) fn deser_operation_crate_operation_create_connection(
value: &[u8],
mut builder: crate::output::create_connection_output::Builder,
) -> Result<
crate::output::create_connection_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() {
"ConnectionArn" => {
builder = builder.set_connection_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Tags" => {
builder = builder.set_tags(
crate::json_deser::deser_list_com_amazonaws_codestarconnections_tag_list(tokens)?
);
}
_ => 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)
}
Appends an item to tags
.
To override the contents of this collection use set_tags
.
Specifies the tags applied to the resource.
Specifies the tags applied to the resource.
Examples found in repository?
src/json_deser.rs (lines 182-184)
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
pub(crate) fn deser_operation_crate_operation_create_connection(
value: &[u8],
mut builder: crate::output::create_connection_output::Builder,
) -> Result<
crate::output::create_connection_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() {
"ConnectionArn" => {
builder = builder.set_connection_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Tags" => {
builder = builder.set_tags(
crate::json_deser::deser_list_com_amazonaws_codestarconnections_tag_list(tokens)?
);
}
_ => 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) -> CreateConnectionOutput
pub fn build(self) -> CreateConnectionOutput
Consumes the builder and constructs a CreateConnectionOutput
.
Examples found in repository?
src/operation_deser.rs (line 86)
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
pub fn parse_create_connection_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateConnectionOutput, crate::error::CreateConnectionError>
{
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_connection_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_create_connection(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateConnectionError::unhandled)?;
output.build()
})
}