code: public byte[] convertToXmlByteArray(MetricsConfiguration config) throws SdkClientException {
          XmlWriter xml = new XmlWriter();
  
          xml.start("MetricsConfiguration", "xmlns", Constants.XML_NAMESPACE);
  
          addParameterIfNotNull(xml, "Id", config.getId());
          writeMetricsFilter(xml, config.getFilter());
  
          xml.end();
  
          return xml.getBytes();
      }
docs: /*
  <MetricsConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Id>metrics-id</Id>
  <Filter>
  <!-- A filter should have only one of Prefix, Tag or And-->
  <Prefix>prefix</Prefix>
  <Tag>
  <Key>Project</Key>
  <Value>Foo</Value>
  </Tag>
  <And>
  <Prefix>documents/</Prefix>
  <Tag>
  <Key>foo</Key>
  <Value>bar</Value>
  </Tag>
  </And>
  </Filter>
  </MetricsConfiguration>