<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <include href="common.rng"/>
  <start>
    <element name="ListBucketResult">
      <element name="Name">
        <data type="string"/>
      </element>
      <element name="Prefix">
        <data type="string"/>
      </element>
      <choice>
        <group>
          <element name="Marker">
            <data type="string"/>
          </element>
          <optional>
            <element name="NextMarker">
              <data type="string"/>
            </element>
          </optional>
        </group>
        <group>
          <optional>
            <element name="NextContinuationToken">
              <data type="string"/>
            </element>
          </optional>
          <optional>
            <element name="ContinuationToken">
              <data type="string"/>
            </element>
          </optional>
          <optional>
            <element name="StartAfter">
              <data type="string"/>
            </element>
          </optional>
          <element name="KeyCount">
            <data type="int"/>
          </element>
        </group>
      </choice>
      <element name="MaxKeys">
        <data type="int"/>
      </element>
      <optional>
        <element name="Delimiter">
          <data type="string"/>
        </element>
      </optional>
      <optional>
        <element name="EncodingType">
          <data type="string"/>
        </element>
      </optional>
      <element name="IsTruncated">
        <data type="boolean"/>
      </element>
      <zeroOrMore>
        <element name="Contents">
          <element name="Key">
            <data type="string"/>
          </element>
          <element name="LastModified">
            <data type="dateTime"/>
          </element>
          <element name="ETag">
            <data type="string"/>
          </element>
          <element name="Size">
            <data type="long"/>
          </element>
          <optional>
            <element name="Owner">
              <ref name="CanonicalUser"/>
            </element>
          </optional>
          <element name="StorageClass">
            <ref name="StorageClass"/>
          </element>
        </element>
      </zeroOrMore>
      <zeroOrMore>
        <element name="CommonPrefixes">
          <element name="Prefix">
            <data type="string"/>
          </element>
        </element>
      </zeroOrMore>
    </element>
  </start>
</grammar>
