Struct aws_sdk_s3::output::list_objects_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ListObjectsOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn is_truncated(self, input: bool) -> Self
pub fn is_truncated(self, input: bool) -> Self
A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria.
sourcepub fn set_is_truncated(self, input: Option<bool>) -> Self
pub fn set_is_truncated(self, input: Option<bool>) -> Self
A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria.
Examples found in repository?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn marker(self, input: impl Into<String>) -> Self
pub fn marker(self, input: impl Into<String>) -> Self
Indicates where in the bucket listing begins. Marker is included in the response if it was sent with the request.
sourcepub fn set_marker(self, input: Option<String>) -> Self
pub fn set_marker(self, input: Option<String>) -> Self
Indicates where in the bucket listing begins. Marker is included in the response if it was sent with the request.
Examples found in repository?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn next_marker(self, input: impl Into<String>) -> Self
pub fn next_marker(self, input: impl Into<String>) -> Self
When response is truncated (the IsTruncated element value in the response is true), you can use the key name in this field as marker in the subsequent request to get next set of objects. Amazon S3 lists objects in alphabetical order Note: This element is returned only if you have delimiter request parameter specified. If response does not include the NextMarker and it is truncated, you can use the value of the last Key in the response as the marker in the subsequent request to get the next set of object keys.
sourcepub fn set_next_marker(self, input: Option<String>) -> Self
pub fn set_next_marker(self, input: Option<String>) -> Self
When response is truncated (the IsTruncated element value in the response is true), you can use the key name in this field as marker in the subsequent request to get next set of objects. Amazon S3 lists objects in alphabetical order Note: This element is returned only if you have delimiter request parameter specified. If response does not include the NextMarker and it is truncated, you can use the value of the last Key in the response as the marker in the subsequent request to get the next set of object keys.
Examples found in repository?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
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?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The bucket name.
Examples found in repository?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
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?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
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?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn max_keys(self, input: i32) -> Self
pub fn max_keys(self, input: i32) -> Self
The maximum number of keys returned in the response body.
sourcepub fn set_max_keys(self, input: Option<i32>) -> Self
pub fn set_max_keys(self, input: Option<i32>) -> Self
The maximum number of keys returned in the response body.
Examples found in repository?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
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 in 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 the 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 in 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 the 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?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
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 keys in the response.
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 keys in the response.
Examples found in repository?
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 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 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
pub fn deser_operation_crate_operation_list_objects(
inp: &[u8],
mut builder: crate::output::list_objects_output::Builder,
) -> Result<crate::output::list_objects_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#ListObjectsOutput$CommonPrefixes */ => {
let var_94 =
Some(
Result::<std::vec::Vec<crate::model::CommonPrefix>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_95 = builder.common_prefixes.take().unwrap_or_default();
list_95.push(
crate::xml_deser::deser_structure_crate_model_common_prefix(&mut tag)
?
);
list_95
})
?
)
;
builder = builder.set_common_prefixes(var_94);
}
,
s if s.matches("Contents") /* Contents com.amazonaws.s3.synthetic#ListObjectsOutput$Contents */ => {
let var_96 =
Some(
Result::<std::vec::Vec<crate::model::Object>, aws_smithy_xml::decode::XmlDecodeError>::Ok({
let mut list_97 = builder.contents.take().unwrap_or_default();
list_97.push(
crate::xml_deser::deser_structure_crate_model_object(&mut tag)
?
);
list_97
})
?
)
;
builder = builder.set_contents(var_96);
}
,
s if s.matches("Delimiter") /* Delimiter com.amazonaws.s3.synthetic#ListObjectsOutput$Delimiter */ => {
let var_98 =
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_98);
}
,
s if s.matches("EncodingType") /* EncodingType com.amazonaws.s3.synthetic#ListObjectsOutput$EncodingType */ => {
let var_99 =
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_99);
}
,
s if s.matches("IsTruncated") /* IsTruncated com.amazonaws.s3.synthetic#ListObjectsOutput$IsTruncated */ => {
let var_100 =
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_100);
}
,
s if s.matches("Marker") /* Marker com.amazonaws.s3.synthetic#ListObjectsOutput$Marker */ => {
let var_101 =
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_marker(var_101);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.s3.synthetic#ListObjectsOutput$Prefix */ => {
let var_102 =
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_102);
}
,
s if s.matches("NextMarker") /* NextMarker com.amazonaws.s3.synthetic#ListObjectsOutput$NextMarker */ => {
let var_103 =
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_marker(var_103);
}
,
s if s.matches("MaxKeys") /* MaxKeys com.amazonaws.s3.synthetic#ListObjectsOutput$MaxKeys */ => {
let var_104 =
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_104);
}
,
s if s.matches("Name") /* Name com.amazonaws.s3.synthetic#ListObjectsOutput$Name */ => {
let var_105 =
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_105);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn build(self) -> ListObjectsOutput
pub fn build(self) -> ListObjectsOutput
Consumes the builder and constructs a ListObjectsOutput
.
Examples found in repository?
2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840
pub fn parse_list_objects_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListObjectsOutput, crate::error::ListObjectsError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_objects_output::Builder::default();
let _ = response;
output = crate::xml_deser::deser_operation_crate_operation_list_objects(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListObjectsError::unhandled)?;
output.build()
})
}