Struct aws_sdk_s3::output::list_parts_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ListPartsOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn abort_date(self, input: DateTime) -> Self
pub fn abort_date(self, input: DateTime) -> Self
If the bucket has a lifecycle rule configured with an action to abort incomplete multipart uploads and the prefix in the lifecycle rule matches the object name in the request, then the response includes this header indicating when the initiated multipart upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy.
The response will also include the x-amz-abort-rule-id
header that will provide the ID of the lifecycle configuration rule that defines this action.
sourcepub fn set_abort_date(self, input: Option<DateTime>) -> Self
pub fn set_abort_date(self, input: Option<DateTime>) -> Self
If the bucket has a lifecycle rule configured with an action to abort incomplete multipart uploads and the prefix in the lifecycle rule matches the object name in the request, then the response includes this header indicating when the initiated multipart upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy.
The response will also include the x-amz-abort-rule-id
header that will provide the ID of the lifecycle configuration rule that defines this action.
Examples found in repository?
2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983
pub fn parse_list_parts_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListPartsOutput, crate::error::ListPartsError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_parts_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_list_parts(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListPartsError::unhandled)?;
output = output.set_abort_date(
crate::http_serde::deser_header_list_parts_list_parts_output_abort_date(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse AbortDate from header `x-amz-abort-date",
)
})?,
);
output = output.set_abort_rule_id(
crate::http_serde::deser_header_list_parts_list_parts_output_abort_rule_id(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse AbortRuleId from header `x-amz-abort-rule-id",
)
})?,
);
output = output.set_request_charged(
crate::http_serde::deser_header_list_parts_list_parts_output_request_charged(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse RequestCharged from header `x-amz-request-charged",
)
})?,
);
output.build()
})
}
sourcepub fn abort_rule_id(self, input: impl Into<String>) -> Self
pub fn abort_rule_id(self, input: impl Into<String>) -> Self
This header is returned along with the x-amz-abort-date
header. It identifies applicable lifecycle configuration rule that defines the action to abort incomplete multipart uploads.
sourcepub fn set_abort_rule_id(self, input: Option<String>) -> Self
pub fn set_abort_rule_id(self, input: Option<String>) -> Self
This header is returned along with the x-amz-abort-date
header. It identifies applicable lifecycle configuration rule that defines the action to abort incomplete multipart uploads.
Examples found in repository?
2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983
pub fn parse_list_parts_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListPartsOutput, crate::error::ListPartsError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_parts_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_list_parts(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListPartsError::unhandled)?;
output = output.set_abort_date(
crate::http_serde::deser_header_list_parts_list_parts_output_abort_date(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse AbortDate from header `x-amz-abort-date",
)
})?,
);
output = output.set_abort_rule_id(
crate::http_serde::deser_header_list_parts_list_parts_output_abort_rule_id(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse AbortRuleId from header `x-amz-abort-rule-id",
)
})?,
);
output = output.set_request_charged(
crate::http_serde::deser_header_list_parts_list_parts_output_request_charged(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse RequestCharged from header `x-amz-request-charged",
)
})?,
);
output.build()
})
}
sourcepub fn bucket(self, input: impl Into<String>) -> Self
pub fn bucket(self, input: impl Into<String>) -> Self
The name of the bucket to which the multipart upload was initiated. Does not return the access point ARN or access point alias if used.
sourcepub fn set_bucket(self, input: Option<String>) -> Self
pub fn set_bucket(self, input: Option<String>) -> Self
The name of the bucket to which the multipart upload was initiated. Does not return the access point ARN or access point alias if used.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn key(self, input: impl Into<String>) -> Self
pub fn key(self, input: impl Into<String>) -> Self
Object key for which the multipart upload was initiated.
sourcepub fn set_key(self, input: Option<String>) -> Self
pub fn set_key(self, input: Option<String>) -> Self
Object key for which the multipart upload was initiated.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn upload_id(self, input: impl Into<String>) -> Self
pub fn upload_id(self, input: impl Into<String>) -> Self
Upload ID identifying the multipart upload whose parts are being listed.
sourcepub fn set_upload_id(self, input: Option<String>) -> Self
pub fn set_upload_id(self, input: Option<String>) -> Self
Upload ID identifying the multipart upload whose parts are being listed.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn part_number_marker(self, input: impl Into<String>) -> Self
pub fn part_number_marker(self, input: impl Into<String>) -> Self
When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.
sourcepub fn set_part_number_marker(self, input: Option<String>) -> Self
pub fn set_part_number_marker(self, input: Option<String>) -> Self
When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn next_part_number_marker(self, input: impl Into<String>) -> Self
pub fn next_part_number_marker(self, input: impl Into<String>) -> Self
When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.
sourcepub fn set_next_part_number_marker(self, input: Option<String>) -> Self
pub fn set_next_part_number_marker(self, input: Option<String>) -> Self
When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn max_parts(self, input: i32) -> Self
pub fn max_parts(self, input: i32) -> Self
Maximum number of parts that were allowed in the response.
sourcepub fn set_max_parts(self, input: Option<i32>) -> Self
pub fn set_max_parts(self, input: Option<i32>) -> Self
Maximum number of parts that were allowed in the response.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn is_truncated(self, input: bool) -> Self
pub fn is_truncated(self, input: bool) -> Self
Indicates whether the returned list of parts is truncated. A true value indicates that the list was truncated. A list can be truncated if the number of parts exceeds the limit returned in the MaxParts element.
sourcepub fn set_is_truncated(self, input: Option<bool>) -> Self
pub fn set_is_truncated(self, input: Option<bool>) -> Self
Indicates whether the returned list of parts is truncated. A true value indicates that the list was truncated. A list can be truncated if the number of parts exceeds the limit returned in the MaxParts element.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn parts(self, input: Part) -> Self
pub fn parts(self, input: Part) -> Self
Appends an item to parts
.
To override the contents of this collection use set_parts
.
Container for elements related to a particular part. A response can contain zero or more Part
elements.
sourcepub fn set_parts(self, input: Option<Vec<Part>>) -> Self
pub fn set_parts(self, input: Option<Vec<Part>>) -> Self
Container for elements related to a particular part. A response can contain zero or more Part
elements.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn initiator(self, input: Initiator) -> Self
pub fn initiator(self, input: Initiator) -> Self
Container element that identifies who initiated the multipart upload. If the initiator is an Amazon Web Services account, this element provides the same information as the Owner
element. If the initiator is an IAM User, this element provides the user ARN and display name.
sourcepub fn set_initiator(self, input: Option<Initiator>) -> Self
pub fn set_initiator(self, input: Option<Initiator>) -> Self
Container element that identifies who initiated the multipart upload. If the initiator is an Amazon Web Services account, this element provides the same information as the Owner
element. If the initiator is an IAM User, this element provides the user ARN and display name.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn owner(self, input: Owner) -> Self
pub fn owner(self, input: Owner) -> Self
Container element that identifies the object owner, after the object is created. If multipart upload is initiated by an IAM user, this element provides the parent account ID and display name.
sourcepub fn set_owner(self, input: Option<Owner>) -> Self
pub fn set_owner(self, input: Option<Owner>) -> Self
Container element that identifies the object owner, after the object is created. If multipart upload is initiated by an IAM user, this element provides the parent account ID and display name.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn storage_class(self, input: StorageClass) -> Self
pub fn storage_class(self, input: StorageClass) -> Self
Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded object.
sourcepub fn set_storage_class(self, input: Option<StorageClass>) -> Self
pub fn set_storage_class(self, input: Option<StorageClass>) -> Self
Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded object.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn request_charged(self, input: RequestCharged) -> Self
pub fn request_charged(self, input: RequestCharged) -> Self
If present, indicates that the requester was successfully charged for the request.
sourcepub fn set_request_charged(self, input: Option<RequestCharged>) -> Self
pub fn set_request_charged(self, input: Option<RequestCharged>) -> Self
If present, indicates that the requester was successfully charged for the request.
Examples found in repository?
2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983
pub fn parse_list_parts_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListPartsOutput, crate::error::ListPartsError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_parts_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_list_parts(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListPartsError::unhandled)?;
output = output.set_abort_date(
crate::http_serde::deser_header_list_parts_list_parts_output_abort_date(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse AbortDate from header `x-amz-abort-date",
)
})?,
);
output = output.set_abort_rule_id(
crate::http_serde::deser_header_list_parts_list_parts_output_abort_rule_id(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse AbortRuleId from header `x-amz-abort-rule-id",
)
})?,
);
output = output.set_request_charged(
crate::http_serde::deser_header_list_parts_list_parts_output_request_charged(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse RequestCharged from header `x-amz-request-charged",
)
})?,
);
output.build()
})
}
sourcepub fn checksum_algorithm(self, input: ChecksumAlgorithm) -> Self
pub fn checksum_algorithm(self, input: ChecksumAlgorithm) -> Self
The algorithm that was used to create a checksum of the object.
sourcepub fn set_checksum_algorithm(self, input: Option<ChecksumAlgorithm>) -> Self
pub fn set_checksum_algorithm(self, input: Option<ChecksumAlgorithm>) -> Self
The algorithm that was used to create a checksum of the object.
Examples found in repository?
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641
pub fn deser_operation_crate_operation_list_parts(
inp: &[u8],
mut builder: crate::output::list_parts_output::Builder,
) -> Result<crate::output::list_parts_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("ListPartsResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListPartsResult but got {:?}. This is likely a bug in the SDK.", start_el)
)
);
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Owner") /* Owner com.amazonaws.s3.synthetic#ListPartsOutput$Owner */ => {
let var_136 =
Some(
crate::xml_deser::deser_structure_crate_model_owner(&mut tag)
?
)
;
builder = builder.set_owner(var_136);
}
,
s if s.matches("NextPartNumberMarker") /* NextPartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$NextPartNumberMarker */ => {
let var_137 =
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_next_part_number_marker(var_137);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#ListPartsOutput$StorageClass */ => {
let var_138 =
Some(
Result::<crate::model::StorageClass, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::StorageClass::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_storage_class(var_138);
}
,
s if s.matches("ChecksumAlgorithm") /* ChecksumAlgorithm com.amazonaws.s3.synthetic#ListPartsOutput$ChecksumAlgorithm */ => {
let var_139 =
Some(
Result::<crate::model::ChecksumAlgorithm, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ChecksumAlgorithm::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_checksum_algorithm(var_139);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListPartsOutput$IsTruncated */ => {
let var_140 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.s3#IsTruncated`)"))
}
?
)
;
builder = builder.set_is_truncated(var_140);
}
,
s if s.matches("MaxParts") /* MaxParts com.amazonaws.s3.synthetic#ListPartsOutput$MaxParts */ => {
let var_141 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.s3#MaxParts`)"))
}
?
)
;
builder = builder.set_max_parts(var_141);
}
,
s if s.matches("UploadId") /* UploadId com.amazonaws.s3.synthetic#ListPartsOutput$UploadId */ => {
let var_142 =
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_upload_id(var_142);
}
,
s if s.matches("PartNumberMarker") /* PartNumberMarker com.amazonaws.s3.synthetic#ListPartsOutput$PartNumberMarker */ => {
let var_143 =
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_part_number_marker(var_143);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.s3.synthetic#ListPartsOutput$Bucket */ => {
let var_144 =
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_bucket(var_144);
}
,
s if s.matches("Part") /* Parts com.amazonaws.s3.synthetic#ListPartsOutput$Parts */ => {
let var_145 =
Some(
Result::<std::vec::Vec<crate::model::Part>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_146 = builder.parts.take().unwrap_or_default();
list_146.push(
crate::xml_deser::deser_structure_crate_model_part(&mut tag)
?
);
list_146
})
?
)
;
builder = builder.set_parts(var_145);
}
,
s if s.matches("Initiator") /* Initiator com.amazonaws.s3.synthetic#ListPartsOutput$Initiator */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_crate_model_initiator(&mut tag)
?
)
;
builder = builder.set_initiator(var_147);
}
,
s if s.matches("Key") /* Key com.amazonaws.s3.synthetic#ListPartsOutput$Key */ => {
let var_148 =
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_key(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn build(self) -> ListPartsOutput
pub fn build(self) -> ListPartsOutput
Consumes the builder and constructs a ListPartsOutput
.
Examples found in repository?
2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983
pub fn parse_list_parts_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListPartsOutput, crate::error::ListPartsError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_parts_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_list_parts(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListPartsError::unhandled)?;
output = output.set_abort_date(
crate::http_serde::deser_header_list_parts_list_parts_output_abort_date(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse AbortDate from header `x-amz-abort-date",
)
})?,
);
output = output.set_abort_rule_id(
crate::http_serde::deser_header_list_parts_list_parts_output_abort_rule_id(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse AbortRuleId from header `x-amz-abort-rule-id",
)
})?,
);
output = output.set_request_charged(
crate::http_serde::deser_header_list_parts_list_parts_output_request_charged(
response.headers(),
)
.map_err(|_| {
crate::error::ListPartsError::unhandled(
"Failed to parse RequestCharged from header `x-amz-request-charged",
)
})?,
);
output.build()
})
}