code: public static byte[] convertToXmlByteArray(RestoreObjectRequest restoreObjectRequest) throws SdkClientException {
          XmlWriter xml = new XmlWriter();
  
          xml.start("RestoreRequest");
          xml.start("Days").value(Integer.toString(restoreObjectRequest.getExpirationInDays())).end();
          final GlacierJobParameters glacierJobParameters = restoreObjectRequest.getGlacierJobParameters();
          if (glacierJobParameters != null) {
              xml.start("GlacierJobParameters");
              addIfNotNull(xml, "Tier", glacierJobParameters.getTier());
              xml.end();
          }
          xml.end();
  
          return xml.getBytes();
      }
docs: Converts the RestoreObjectRequest to an XML fragment that can be sent to
  the RestoreObject operation of Amazon S3.
  
  @param restoreObjectRequest
  The container which provides options for restoring an object,
  which was transitioned to the Glacier from S3 when it was
  expired, into S3 again.
  
  @return A byte array containing the data
  
  @throws SdkClientException