Struct aws_sdk_s3::output::get_object_attributes_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for GetObjectAttributesOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn delete_marker(self, input: bool) -> Self
pub fn delete_marker(self, input: bool) -> Self
Specifies whether the object retrieved was (true
) or was not (false
) a delete marker. If false
, this response header does not appear in the response.
sourcepub fn set_delete_marker(self, input: Option<bool>) -> Self
pub fn set_delete_marker(self, input: Option<bool>) -> Self
Specifies whether the object retrieved was (true
) or was not (false
) a delete marker. If false
, this response header does not appear in the response.
Examples found in repository?
1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
pub fn parse_get_object_attributes_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetObjectAttributesOutput,
crate::error::GetObjectAttributesError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_object_attributes_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_get_object_attributes(
response.body().as_ref(),
output,
)
.map_err(crate::error::GetObjectAttributesError::unhandled)?;
output = output.set_delete_marker(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_delete_marker(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse DeleteMarker from header `x-amz-delete-marker"))?
);
output = output.set_last_modified(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_last_modified(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse LastModified from header `Last-Modified"))?
);
output = output.set_request_charged(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_request_charged(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse RequestCharged from header `x-amz-request-charged"))?
);
output = output.set_version_id(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_version_id(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse VersionId from header `x-amz-version-id"))?
);
output.build()
})
}
sourcepub fn last_modified(self, input: DateTime) -> Self
pub fn last_modified(self, input: DateTime) -> Self
The creation date of the object.
sourcepub fn set_last_modified(self, input: Option<DateTime>) -> Self
pub fn set_last_modified(self, input: Option<DateTime>) -> Self
The creation date of the object.
Examples found in repository?
1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
pub fn parse_get_object_attributes_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetObjectAttributesOutput,
crate::error::GetObjectAttributesError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_object_attributes_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_get_object_attributes(
response.body().as_ref(),
output,
)
.map_err(crate::error::GetObjectAttributesError::unhandled)?;
output = output.set_delete_marker(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_delete_marker(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse DeleteMarker from header `x-amz-delete-marker"))?
);
output = output.set_last_modified(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_last_modified(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse LastModified from header `Last-Modified"))?
);
output = output.set_request_charged(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_request_charged(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse RequestCharged from header `x-amz-request-charged"))?
);
output = output.set_version_id(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_version_id(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse VersionId from header `x-amz-version-id"))?
);
output.build()
})
}
sourcepub fn version_id(self, input: impl Into<String>) -> Self
pub fn version_id(self, input: impl Into<String>) -> Self
The version ID of the object.
sourcepub fn set_version_id(self, input: Option<String>) -> Self
pub fn set_version_id(self, input: Option<String>) -> Self
The version ID of the object.
Examples found in repository?
1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
pub fn parse_get_object_attributes_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetObjectAttributesOutput,
crate::error::GetObjectAttributesError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_object_attributes_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_get_object_attributes(
response.body().as_ref(),
output,
)
.map_err(crate::error::GetObjectAttributesError::unhandled)?;
output = output.set_delete_marker(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_delete_marker(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse DeleteMarker from header `x-amz-delete-marker"))?
);
output = output.set_last_modified(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_last_modified(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse LastModified from header `Last-Modified"))?
);
output = output.set_request_charged(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_request_charged(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse RequestCharged from header `x-amz-request-charged"))?
);
output = output.set_version_id(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_version_id(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse VersionId from header `x-amz-version-id"))?
);
output.build()
})
}
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?
1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
pub fn parse_get_object_attributes_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetObjectAttributesOutput,
crate::error::GetObjectAttributesError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_object_attributes_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_get_object_attributes(
response.body().as_ref(),
output,
)
.map_err(crate::error::GetObjectAttributesError::unhandled)?;
output = output.set_delete_marker(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_delete_marker(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse DeleteMarker from header `x-amz-delete-marker"))?
);
output = output.set_last_modified(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_last_modified(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse LastModified from header `Last-Modified"))?
);
output = output.set_request_charged(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_request_charged(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse RequestCharged from header `x-amz-request-charged"))?
);
output = output.set_version_id(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_version_id(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse VersionId from header `x-amz-version-id"))?
);
output.build()
})
}
sourcepub fn e_tag(self, input: impl Into<String>) -> Self
pub fn e_tag(self, input: impl Into<String>) -> Self
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.
sourcepub fn set_e_tag(self, input: Option<String>) -> Self
pub fn set_e_tag(self, input: Option<String>) -> Self
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.
Examples found in repository?
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180
pub fn deser_operation_crate_operation_get_object_attributes(
inp: &[u8],
mut builder: crate::output::get_object_attributes_output::Builder,
) -> Result<
crate::output::get_object_attributes_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();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ETag") /* ETag com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ETag */ => {
let var_50 =
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_e_tag(var_50);
}
,
s if s.matches("Checksum") /* Checksum com.amazonaws.s3.synthetic#GetObjectAttributesOutput$Checksum */ => {
let var_51 =
Some(
crate::xml_deser::deser_structure_crate_model_checksum(&mut tag)
?
)
;
builder = builder.set_checksum(var_51);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#GetObjectAttributesOutput$StorageClass */ => {
let var_52 =
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_52);
}
,
s if s.matches("ObjectSize") /* ObjectSize com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectSize */ => {
let var_53 =
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#ObjectSize`)"))
}
?
)
;
builder = builder.set_object_size(var_53);
}
,
s if s.matches("ObjectParts") /* ObjectParts com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectParts */ => {
let var_54 =
Some(
crate::xml_deser::deser_structure_crate_model_get_object_attributes_parts(&mut tag)
?
)
;
builder = builder.set_object_parts(var_54);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn set_checksum(self, input: Option<Checksum>) -> Self
pub fn set_checksum(self, input: Option<Checksum>) -> Self
The checksum or digest of the object.
Examples found in repository?
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180
pub fn deser_operation_crate_operation_get_object_attributes(
inp: &[u8],
mut builder: crate::output::get_object_attributes_output::Builder,
) -> Result<
crate::output::get_object_attributes_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();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ETag") /* ETag com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ETag */ => {
let var_50 =
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_e_tag(var_50);
}
,
s if s.matches("Checksum") /* Checksum com.amazonaws.s3.synthetic#GetObjectAttributesOutput$Checksum */ => {
let var_51 =
Some(
crate::xml_deser::deser_structure_crate_model_checksum(&mut tag)
?
)
;
builder = builder.set_checksum(var_51);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#GetObjectAttributesOutput$StorageClass */ => {
let var_52 =
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_52);
}
,
s if s.matches("ObjectSize") /* ObjectSize com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectSize */ => {
let var_53 =
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#ObjectSize`)"))
}
?
)
;
builder = builder.set_object_size(var_53);
}
,
s if s.matches("ObjectParts") /* ObjectParts com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectParts */ => {
let var_54 =
Some(
crate::xml_deser::deser_structure_crate_model_get_object_attributes_parts(&mut tag)
?
)
;
builder = builder.set_object_parts(var_54);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn object_parts(self, input: GetObjectAttributesParts) -> Self
pub fn object_parts(self, input: GetObjectAttributesParts) -> Self
A collection of parts associated with a multipart upload.
sourcepub fn set_object_parts(self, input: Option<GetObjectAttributesParts>) -> Self
pub fn set_object_parts(self, input: Option<GetObjectAttributesParts>) -> Self
A collection of parts associated with a multipart upload.
Examples found in repository?
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180
pub fn deser_operation_crate_operation_get_object_attributes(
inp: &[u8],
mut builder: crate::output::get_object_attributes_output::Builder,
) -> Result<
crate::output::get_object_attributes_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();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ETag") /* ETag com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ETag */ => {
let var_50 =
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_e_tag(var_50);
}
,
s if s.matches("Checksum") /* Checksum com.amazonaws.s3.synthetic#GetObjectAttributesOutput$Checksum */ => {
let var_51 =
Some(
crate::xml_deser::deser_structure_crate_model_checksum(&mut tag)
?
)
;
builder = builder.set_checksum(var_51);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#GetObjectAttributesOutput$StorageClass */ => {
let var_52 =
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_52);
}
,
s if s.matches("ObjectSize") /* ObjectSize com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectSize */ => {
let var_53 =
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#ObjectSize`)"))
}
?
)
;
builder = builder.set_object_size(var_53);
}
,
s if s.matches("ObjectParts") /* ObjectParts com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectParts */ => {
let var_54 =
Some(
crate::xml_deser::deser_structure_crate_model_get_object_attributes_parts(&mut tag)
?
)
;
builder = builder.set_object_parts(var_54);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn storage_class(self, input: StorageClass) -> Self
pub fn storage_class(self, input: StorageClass) -> Self
Provides the storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.
For more information, see Storage Classes.
sourcepub fn set_storage_class(self, input: Option<StorageClass>) -> Self
pub fn set_storage_class(self, input: Option<StorageClass>) -> Self
Provides the storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.
For more information, see Storage Classes.
Examples found in repository?
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180
pub fn deser_operation_crate_operation_get_object_attributes(
inp: &[u8],
mut builder: crate::output::get_object_attributes_output::Builder,
) -> Result<
crate::output::get_object_attributes_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();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ETag") /* ETag com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ETag */ => {
let var_50 =
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_e_tag(var_50);
}
,
s if s.matches("Checksum") /* Checksum com.amazonaws.s3.synthetic#GetObjectAttributesOutput$Checksum */ => {
let var_51 =
Some(
crate::xml_deser::deser_structure_crate_model_checksum(&mut tag)
?
)
;
builder = builder.set_checksum(var_51);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#GetObjectAttributesOutput$StorageClass */ => {
let var_52 =
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_52);
}
,
s if s.matches("ObjectSize") /* ObjectSize com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectSize */ => {
let var_53 =
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#ObjectSize`)"))
}
?
)
;
builder = builder.set_object_size(var_53);
}
,
s if s.matches("ObjectParts") /* ObjectParts com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectParts */ => {
let var_54 =
Some(
crate::xml_deser::deser_structure_crate_model_get_object_attributes_parts(&mut tag)
?
)
;
builder = builder.set_object_parts(var_54);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn object_size(self, input: i64) -> Self
pub fn object_size(self, input: i64) -> Self
The size of the object in bytes.
sourcepub fn set_object_size(self, input: Option<i64>) -> Self
pub fn set_object_size(self, input: Option<i64>) -> Self
The size of the object in bytes.
Examples found in repository?
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180
pub fn deser_operation_crate_operation_get_object_attributes(
inp: &[u8],
mut builder: crate::output::get_object_attributes_output::Builder,
) -> Result<
crate::output::get_object_attributes_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();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ETag") /* ETag com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ETag */ => {
let var_50 =
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_e_tag(var_50);
}
,
s if s.matches("Checksum") /* Checksum com.amazonaws.s3.synthetic#GetObjectAttributesOutput$Checksum */ => {
let var_51 =
Some(
crate::xml_deser::deser_structure_crate_model_checksum(&mut tag)
?
)
;
builder = builder.set_checksum(var_51);
}
,
s if s.matches("StorageClass") /* StorageClass com.amazonaws.s3.synthetic#GetObjectAttributesOutput$StorageClass */ => {
let var_52 =
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_52);
}
,
s if s.matches("ObjectSize") /* ObjectSize com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectSize */ => {
let var_53 =
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#ObjectSize`)"))
}
?
)
;
builder = builder.set_object_size(var_53);
}
,
s if s.matches("ObjectParts") /* ObjectParts com.amazonaws.s3.synthetic#GetObjectAttributesOutput$ObjectParts */ => {
let var_54 =
Some(
crate::xml_deser::deser_structure_crate_model_get_object_attributes_parts(&mut tag)
?
)
;
builder = builder.set_object_parts(var_54);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn build(self) -> GetObjectAttributesOutput
pub fn build(self) -> GetObjectAttributesOutput
Consumes the builder and constructs a GetObjectAttributesOutput
.
Examples found in repository?
1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
pub fn parse_get_object_attributes_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetObjectAttributesOutput,
crate::error::GetObjectAttributesError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_object_attributes_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_get_object_attributes(
response.body().as_ref(),
output,
)
.map_err(crate::error::GetObjectAttributesError::unhandled)?;
output = output.set_delete_marker(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_delete_marker(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse DeleteMarker from header `x-amz-delete-marker"))?
);
output = output.set_last_modified(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_last_modified(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse LastModified from header `Last-Modified"))?
);
output = output.set_request_charged(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_request_charged(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse RequestCharged from header `x-amz-request-charged"))?
);
output = output.set_version_id(
crate::http_serde::deser_header_get_object_attributes_get_object_attributes_output_version_id(response.headers())
.map_err(|_|crate::error::GetObjectAttributesError::unhandled("Failed to parse VersionId from header `x-amz-version-id"))?
);
output.build()
})
}