Struct aws_sdk_ec2::output::create_vpc_endpoint_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for CreateVpcEndpointOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn vpc_endpoint(self, input: VpcEndpoint) -> Self
pub fn vpc_endpoint(self, input: VpcEndpoint) -> Self
Information about the endpoint.
sourcepub fn set_vpc_endpoint(self, input: Option<VpcEndpoint>) -> Self
pub fn set_vpc_endpoint(self, input: Option<VpcEndpoint>) -> Self
Information about the endpoint.
Examples found in repository?
src/xml_deser.rs (line 5486)
5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506
pub fn deser_operation_crate_operation_create_vpc_endpoint(
inp: &[u8],
mut builder: crate::output::create_vpc_endpoint_output::Builder,
) -> Result<
crate::output::create_vpc_endpoint_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("CreateVpcEndpointResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected CreateVpcEndpointResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcEndpoint") /* VpcEndpoint com.amazonaws.ec2.synthetic#CreateVpcEndpointOutput$VpcEndpoint */ => {
let var_208 =
Some(
crate::xml_deser::deser_structure_crate_model_vpc_endpoint(&mut tag)
?
)
;
builder = builder.set_vpc_endpoint(var_208);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2.synthetic#CreateVpcEndpointOutput$ClientToken */ => {
let var_209 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_209);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Examples found in repository?
src/xml_deser.rs (line 5499)
5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506
pub fn deser_operation_crate_operation_create_vpc_endpoint(
inp: &[u8],
mut builder: crate::output::create_vpc_endpoint_output::Builder,
) -> Result<
crate::output::create_vpc_endpoint_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("CreateVpcEndpointResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected CreateVpcEndpointResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcEndpoint") /* VpcEndpoint com.amazonaws.ec2.synthetic#CreateVpcEndpointOutput$VpcEndpoint */ => {
let var_208 =
Some(
crate::xml_deser::deser_structure_crate_model_vpc_endpoint(&mut tag)
?
)
;
builder = builder.set_vpc_endpoint(var_208);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2.synthetic#CreateVpcEndpointOutput$ClientToken */ => {
let var_209 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_209);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn build(self) -> CreateVpcEndpointOutput
pub fn build(self) -> CreateVpcEndpointOutput
Consumes the builder and constructs a CreateVpcEndpointOutput
.
Examples found in repository?
src/operation_deser.rs (line 3604)
3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606
pub fn parse_create_vpc_endpoint_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateVpcEndpointOutput, crate::error::CreateVpcEndpointError>
{
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_vpc_endpoint_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_create_vpc_endpoint(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateVpcEndpointError::unhandled)?;
output.build()
})
}