Struct aws_sdk_s3::output::list_objects_v2_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ListObjectsV2Output
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn is_truncated(self, input: bool) -> Self
pub fn is_truncated(self, input: bool) -> Self
Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned.
sourcepub fn set_is_truncated(self, input: Option<bool>) -> Self
pub fn set_is_truncated(self, input: Option<bool>) -> Self
Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn contents(self, input: Object) -> Self
pub fn contents(self, input: Object) -> Self
Appends an item to contents
.
To override the contents of this collection use set_contents
.
Metadata about each object returned.
sourcepub fn set_contents(self, input: Option<Vec<Object>>) -> Self
pub fn set_contents(self, input: Option<Vec<Object>>) -> Self
Metadata about each object returned.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The bucket name.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The bucket name.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn prefix(self, input: impl Into<String>) -> Self
pub fn prefix(self, input: impl Into<String>) -> Self
Keys that begin with the indicated prefix.
sourcepub fn set_prefix(self, input: Option<String>) -> Self
pub fn set_prefix(self, input: Option<String>) -> Self
Keys that begin with the indicated prefix.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn delimiter(self, input: impl Into<String>) -> Self
pub fn delimiter(self, input: impl Into<String>) -> Self
Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys
value.
sourcepub fn set_delimiter(self, input: Option<String>) -> Self
pub fn set_delimiter(self, input: Option<String>) -> Self
Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys
value.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn max_keys(self, input: i32) -> Self
pub fn max_keys(self, input: i32) -> Self
Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.
sourcepub fn set_max_keys(self, input: Option<i32>) -> Self
pub fn set_max_keys(self, input: Option<i32>) -> Self
Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn common_prefixes(self, input: CommonPrefix) -> Self
pub fn common_prefixes(self, input: CommonPrefix) -> Self
Appends an item to common_prefixes
.
To override the contents of this collection use set_common_prefixes
.
All of the keys (up to 1,000) rolled up into a common prefix count as a single return when calculating the number of returns.
A response can contain CommonPrefixes
only if you specify a delimiter.
CommonPrefixes
contains all (if there are any) keys between Prefix
and the next occurrence of the string specified by a delimiter.
CommonPrefixes
lists keys that act like subdirectories in the directory specified by Prefix
.
For example, if the prefix is notes/
and the delimiter is a slash (/
) as in notes/summer/july
, the common prefix is notes/summer/
. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns.
sourcepub fn set_common_prefixes(self, input: Option<Vec<CommonPrefix>>) -> Self
pub fn set_common_prefixes(self, input: Option<Vec<CommonPrefix>>) -> Self
All of the keys (up to 1,000) rolled up into a common prefix count as a single return when calculating the number of returns.
A response can contain CommonPrefixes
only if you specify a delimiter.
CommonPrefixes
contains all (if there are any) keys between Prefix
and the next occurrence of the string specified by a delimiter.
CommonPrefixes
lists keys that act like subdirectories in the directory specified by Prefix
.
For example, if the prefix is notes/
and the delimiter is a slash (/
) as in notes/summer/july
, the common prefix is notes/summer/
. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn encoding_type(self, input: EncodingType) -> Self
pub fn encoding_type(self, input: EncodingType) -> Self
Encoding type used by Amazon S3 to encode object key names in the XML response.
If you specify the encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:
Delimiter, Prefix, Key,
and StartAfter
.
sourcepub fn set_encoding_type(self, input: Option<EncodingType>) -> Self
pub fn set_encoding_type(self, input: Option<EncodingType>) -> Self
Encoding type used by Amazon S3 to encode object key names in the XML response.
If you specify the encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:
Delimiter, Prefix, Key,
and StartAfter
.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn key_count(self, input: i32) -> Self
pub fn key_count(self, input: i32) -> Self
KeyCount is the number of keys returned with this request. KeyCount will always be less than or equals to MaxKeys field. Say you ask for 50 keys, your result will include less than equals 50 keys
sourcepub fn set_key_count(self, input: Option<i32>) -> Self
pub fn set_key_count(self, input: Option<i32>) -> Self
KeyCount is the number of keys returned with this request. KeyCount will always be less than or equals to MaxKeys field. Say you ask for 50 keys, your result will include less than equals 50 keys
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn continuation_token(self, input: impl Into<String>) -> Self
pub fn continuation_token(self, input: impl Into<String>) -> Self
If ContinuationToken was sent with the request, it is included in the response.
sourcepub fn set_continuation_token(self, input: Option<String>) -> Self
pub fn set_continuation_token(self, input: Option<String>) -> Self
If ContinuationToken was sent with the request, it is included in the response.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn next_continuation_token(self, input: impl Into<String>) -> Self
pub fn next_continuation_token(self, input: impl Into<String>) -> Self
NextContinuationToken
is sent when isTruncated
is true, which means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 can be continued with this NextContinuationToken
. NextContinuationToken
is obfuscated and is not a real key
sourcepub fn set_next_continuation_token(self, input: Option<String>) -> Self
pub fn set_next_continuation_token(self, input: Option<String>) -> Self
NextContinuationToken
is sent when isTruncated
is true, which means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 can be continued with this NextContinuationToken
. NextContinuationToken
is obfuscated and is not a real key
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn start_after(self, input: impl Into<String>) -> Self
pub fn start_after(self, input: impl Into<String>) -> Self
If StartAfter was sent with the request, it is included in the response.
sourcepub fn set_start_after(self, input: Option<String>) -> Self
pub fn set_start_after(self, input: Option<String>) -> Self
If StartAfter was sent with the request, it is included in the response.
Examples found in repository?
2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
pub fn deser_operation_crate_operation_list_objects_v2(
inp: &[u8],
mut builder: crate::output::list_objects_v2_output::Builder,
) -> Result<crate::output::list_objects_v2_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("ListBucketResult") {
return Err(
aws_smithy_xml::decode::XmlDecodeError::custom(
format!("encountered invalid XML root: expected ListBucketResult 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("CommonPrefixes") /* CommonPrefixes com.amazonaws.s3.synthetic#ListObjectsV2Output$CommonPrefixes */ => {
let var_106 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_107 = builder.common_prefixes.take().unwrap_or_default();
list_107.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_107
})
?
)
;
builder = builder.set_common_prefixes(var_106);
}
,
s if s.matches("NextContinuationToken") /* NextContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$NextContinuationToken */ => {
let var_108 =
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_continuation_token(var_108);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsV2Output$Contents */ => {
let var_109 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_110 = builder.contents.take().unwrap_or_default();
list_110.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_110
})
?
)
;
builder = builder.set_contents(var_109);
}
,
s if s.matches("ContinuationToken") /* ContinuationToken com.amazonaws.s3.synthetic#ListObjectsV2Output$ContinuationToken */ => {
let var_111 =
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_continuation_token(var_111);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsV2Output$Delimiter */ => {
let var_112 =
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_delimiter(var_112);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsV2Output$EncodingType */ => {
let var_113 =
Some(
Result::<crate::model::EncodingType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EncodingType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encoding_type(var_113);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsV2Output$IsTruncated */ => {
let var_114 =
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_114);
}
,
s if s.matches("StartAfter") /* StartAfter com.amazonaws.s3.synthetic#ListObjectsV2Output$StartAfter */ => {
let var_115 =
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_start_after(var_115);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsV2Output$Prefix */ => {
let var_116 =
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_prefix(var_116);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsV2Output$MaxKeys */ => {
let var_117 =
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#MaxKeys`)"))
}
?
)
;
builder = builder.set_max_keys(var_117);
}
,
s if s.matches("KeyCount") /* KeyCount com.amazonaws.s3.synthetic#ListObjectsV2Output$KeyCount */ => {
let var_118 =
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#KeyCount`)"))
}
?
)
;
builder = builder.set_key_count(var_118);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsV2Output$Name */ => {
let var_119 =
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_name(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn build(self) -> ListObjectsV2Output
pub fn build(self) -> ListObjectsV2Output
Consumes the builder and constructs a ListObjectsV2Output
.
Examples found in repository?
2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895
pub fn parse_list_objects_v2_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListObjectsV2Output, crate::error::ListObjectsV2Error> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_objects_v2_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_list_objects_v2(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListObjectsV2Error::unhandled)?;
output.build()
})
}