Struct aws_sdk_s3::model::object_part::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ObjectPart
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn part_number(self, input: i32) -> Self
pub fn part_number(self, input: i32) -> Self
The part number identifying the part. This value is a positive integer between 1 and 10,000.
sourcepub fn set_part_number(self, input: Option<i32>) -> Self
pub fn set_part_number(self, input: Option<i32>) -> Self
The part number identifying the part. This value is a positive integer between 1 and 10,000.
Examples found in repository?
5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872
pub fn deser_structure_crate_model_object_part(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectPart, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectPart::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartNumber") /* PartNumber com.amazonaws.s3#ObjectPart$PartNumber */ => {
let var_320 =
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#PartNumber`)"))
}
?
)
;
builder = builder.set_part_number(var_320);
}
,
s if s.matches("Size") /* Size com.amazonaws.s3#ObjectPart$Size */ => {
let var_321 =
Some(
{
<i64 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 (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_321);
}
,
s if s.matches("ChecksumCRC32") /* ChecksumCRC32 com.amazonaws.s3#ObjectPart$ChecksumCRC32 */ => {
let var_322 =
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_checksum_crc32(var_322);
}
,
s if s.matches("ChecksumCRC32C") /* ChecksumCRC32C com.amazonaws.s3#ObjectPart$ChecksumCRC32C */ => {
let var_323 =
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_checksum_crc32_c(var_323);
}
,
s if s.matches("ChecksumSHA1") /* ChecksumSHA1 com.amazonaws.s3#ObjectPart$ChecksumSHA1 */ => {
let var_324 =
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_checksum_sha1(var_324);
}
,
s if s.matches("ChecksumSHA256") /* ChecksumSHA256 com.amazonaws.s3#ObjectPart$ChecksumSHA256 */ => {
let var_325 =
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_checksum_sha256(var_325);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_size(self, input: Option<i64>) -> Self
pub fn set_size(self, input: Option<i64>) -> Self
The size of the uploaded part in bytes.
Examples found in repository?
5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872
pub fn deser_structure_crate_model_object_part(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectPart, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectPart::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartNumber") /* PartNumber com.amazonaws.s3#ObjectPart$PartNumber */ => {
let var_320 =
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#PartNumber`)"))
}
?
)
;
builder = builder.set_part_number(var_320);
}
,
s if s.matches("Size") /* Size com.amazonaws.s3#ObjectPart$Size */ => {
let var_321 =
Some(
{
<i64 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 (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_321);
}
,
s if s.matches("ChecksumCRC32") /* ChecksumCRC32 com.amazonaws.s3#ObjectPart$ChecksumCRC32 */ => {
let var_322 =
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_checksum_crc32(var_322);
}
,
s if s.matches("ChecksumCRC32C") /* ChecksumCRC32C com.amazonaws.s3#ObjectPart$ChecksumCRC32C */ => {
let var_323 =
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_checksum_crc32_c(var_323);
}
,
s if s.matches("ChecksumSHA1") /* ChecksumSHA1 com.amazonaws.s3#ObjectPart$ChecksumSHA1 */ => {
let var_324 =
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_checksum_sha1(var_324);
}
,
s if s.matches("ChecksumSHA256") /* ChecksumSHA256 com.amazonaws.s3#ObjectPart$ChecksumSHA256 */ => {
let var_325 =
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_checksum_sha256(var_325);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn checksum_crc32(self, input: impl Into<String>) -> Self
pub fn checksum_crc32(self, input: impl Into<String>) -> Self
This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.
sourcepub fn set_checksum_crc32(self, input: Option<String>) -> Self
pub fn set_checksum_crc32(self, input: Option<String>) -> Self
This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.
Examples found in repository?
5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872
pub fn deser_structure_crate_model_object_part(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectPart, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectPart::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartNumber") /* PartNumber com.amazonaws.s3#ObjectPart$PartNumber */ => {
let var_320 =
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#PartNumber`)"))
}
?
)
;
builder = builder.set_part_number(var_320);
}
,
s if s.matches("Size") /* Size com.amazonaws.s3#ObjectPart$Size */ => {
let var_321 =
Some(
{
<i64 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 (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_321);
}
,
s if s.matches("ChecksumCRC32") /* ChecksumCRC32 com.amazonaws.s3#ObjectPart$ChecksumCRC32 */ => {
let var_322 =
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_checksum_crc32(var_322);
}
,
s if s.matches("ChecksumCRC32C") /* ChecksumCRC32C com.amazonaws.s3#ObjectPart$ChecksumCRC32C */ => {
let var_323 =
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_checksum_crc32_c(var_323);
}
,
s if s.matches("ChecksumSHA1") /* ChecksumSHA1 com.amazonaws.s3#ObjectPart$ChecksumSHA1 */ => {
let var_324 =
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_checksum_sha1(var_324);
}
,
s if s.matches("ChecksumSHA256") /* ChecksumSHA256 com.amazonaws.s3#ObjectPart$ChecksumSHA256 */ => {
let var_325 =
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_checksum_sha256(var_325);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn checksum_crc32_c(self, input: impl Into<String>) -> Self
pub fn checksum_crc32_c(self, input: impl Into<String>) -> Self
The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
sourcepub fn set_checksum_crc32_c(self, input: Option<String>) -> Self
pub fn set_checksum_crc32_c(self, input: Option<String>) -> Self
The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
Examples found in repository?
5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872
pub fn deser_structure_crate_model_object_part(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectPart, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectPart::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartNumber") /* PartNumber com.amazonaws.s3#ObjectPart$PartNumber */ => {
let var_320 =
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#PartNumber`)"))
}
?
)
;
builder = builder.set_part_number(var_320);
}
,
s if s.matches("Size") /* Size com.amazonaws.s3#ObjectPart$Size */ => {
let var_321 =
Some(
{
<i64 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 (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_321);
}
,
s if s.matches("ChecksumCRC32") /* ChecksumCRC32 com.amazonaws.s3#ObjectPart$ChecksumCRC32 */ => {
let var_322 =
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_checksum_crc32(var_322);
}
,
s if s.matches("ChecksumCRC32C") /* ChecksumCRC32C com.amazonaws.s3#ObjectPart$ChecksumCRC32C */ => {
let var_323 =
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_checksum_crc32_c(var_323);
}
,
s if s.matches("ChecksumSHA1") /* ChecksumSHA1 com.amazonaws.s3#ObjectPart$ChecksumSHA1 */ => {
let var_324 =
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_checksum_sha1(var_324);
}
,
s if s.matches("ChecksumSHA256") /* ChecksumSHA256 com.amazonaws.s3#ObjectPart$ChecksumSHA256 */ => {
let var_325 =
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_checksum_sha256(var_325);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn checksum_sha1(self, input: impl Into<String>) -> Self
pub fn checksum_sha1(self, input: impl Into<String>) -> Self
The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
sourcepub fn set_checksum_sha1(self, input: Option<String>) -> Self
pub fn set_checksum_sha1(self, input: Option<String>) -> Self
The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
Examples found in repository?
5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872
pub fn deser_structure_crate_model_object_part(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectPart, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectPart::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartNumber") /* PartNumber com.amazonaws.s3#ObjectPart$PartNumber */ => {
let var_320 =
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#PartNumber`)"))
}
?
)
;
builder = builder.set_part_number(var_320);
}
,
s if s.matches("Size") /* Size com.amazonaws.s3#ObjectPart$Size */ => {
let var_321 =
Some(
{
<i64 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 (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_321);
}
,
s if s.matches("ChecksumCRC32") /* ChecksumCRC32 com.amazonaws.s3#ObjectPart$ChecksumCRC32 */ => {
let var_322 =
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_checksum_crc32(var_322);
}
,
s if s.matches("ChecksumCRC32C") /* ChecksumCRC32C com.amazonaws.s3#ObjectPart$ChecksumCRC32C */ => {
let var_323 =
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_checksum_crc32_c(var_323);
}
,
s if s.matches("ChecksumSHA1") /* ChecksumSHA1 com.amazonaws.s3#ObjectPart$ChecksumSHA1 */ => {
let var_324 =
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_checksum_sha1(var_324);
}
,
s if s.matches("ChecksumSHA256") /* ChecksumSHA256 com.amazonaws.s3#ObjectPart$ChecksumSHA256 */ => {
let var_325 =
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_checksum_sha256(var_325);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn checksum_sha256(self, input: impl Into<String>) -> Self
pub fn checksum_sha256(self, input: impl Into<String>) -> Self
The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
sourcepub fn set_checksum_sha256(self, input: Option<String>) -> Self
pub fn set_checksum_sha256(self, input: Option<String>) -> Self
The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
Examples found in repository?
5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872
pub fn deser_structure_crate_model_object_part(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectPart, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectPart::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartNumber") /* PartNumber com.amazonaws.s3#ObjectPart$PartNumber */ => {
let var_320 =
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#PartNumber`)"))
}
?
)
;
builder = builder.set_part_number(var_320);
}
,
s if s.matches("Size") /* Size com.amazonaws.s3#ObjectPart$Size */ => {
let var_321 =
Some(
{
<i64 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 (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_321);
}
,
s if s.matches("ChecksumCRC32") /* ChecksumCRC32 com.amazonaws.s3#ObjectPart$ChecksumCRC32 */ => {
let var_322 =
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_checksum_crc32(var_322);
}
,
s if s.matches("ChecksumCRC32C") /* ChecksumCRC32C com.amazonaws.s3#ObjectPart$ChecksumCRC32C */ => {
let var_323 =
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_checksum_crc32_c(var_323);
}
,
s if s.matches("ChecksumSHA1") /* ChecksumSHA1 com.amazonaws.s3#ObjectPart$ChecksumSHA1 */ => {
let var_324 =
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_checksum_sha1(var_324);
}
,
s if s.matches("ChecksumSHA256") /* ChecksumSHA256 com.amazonaws.s3#ObjectPart$ChecksumSHA256 */ => {
let var_325 =
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_checksum_sha256(var_325);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> ObjectPart
pub fn build(self) -> ObjectPart
Consumes the builder and constructs a ObjectPart
.
Examples found in repository?
5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872
pub fn deser_structure_crate_model_object_part(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectPart, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectPart::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PartNumber") /* PartNumber com.amazonaws.s3#ObjectPart$PartNumber */ => {
let var_320 =
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#PartNumber`)"))
}
?
)
;
builder = builder.set_part_number(var_320);
}
,
s if s.matches("Size") /* Size com.amazonaws.s3#ObjectPart$Size */ => {
let var_321 =
Some(
{
<i64 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 (long: `com.amazonaws.s3#Size`)"))
}
?
)
;
builder = builder.set_size(var_321);
}
,
s if s.matches("ChecksumCRC32") /* ChecksumCRC32 com.amazonaws.s3#ObjectPart$ChecksumCRC32 */ => {
let var_322 =
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_checksum_crc32(var_322);
}
,
s if s.matches("ChecksumCRC32C") /* ChecksumCRC32C com.amazonaws.s3#ObjectPart$ChecksumCRC32C */ => {
let var_323 =
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_checksum_crc32_c(var_323);
}
,
s if s.matches("ChecksumSHA1") /* ChecksumSHA1 com.amazonaws.s3#ObjectPart$ChecksumSHA1 */ => {
let var_324 =
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_checksum_sha1(var_324);
}
,
s if s.matches("ChecksumSHA256") /* ChecksumSHA256 com.amazonaws.s3#ObjectPart$ChecksumSHA256 */ => {
let var_325 =
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_checksum_sha256(var_325);
}
,
_ => {}
}
}
Ok(builder.build())
}