code: protected AmazonWebServiceResponse<T> parseResponseMetadata(HttpResponse response) {
          AmazonWebServiceResponse<T> awsResponse = new AmazonWebServiceResponse<T>();
          String awsRequestId = response.getHeaders().get(Headers.REQUEST_ID);
          String hostId = response.getHeaders().get(Headers.EXTENDED_REQUEST_ID);
          String cloudFrontId = response.getHeaders().get(Headers.CLOUD_FRONT_ID);
  
          Map<String, String> metadataMap = new HashMap<String, String>();
          metadataMap.put(ResponseMetadata.AWS_REQUEST_ID, awsRequestId);
          metadataMap.put(S3ResponseMetadata.HOST_ID, hostId);
          metadataMap.put(S3ResponseMetadata.CLOUD_FRONT_ID, cloudFrontId);
          awsResponse.setResponseMetadata(new S3ResponseMetadata(metadataMap));
  
          return awsResponse;
      }
docs: Parses the S3 response metadata (ex: AWS request ID) from the specified
  response, and returns a AmazonWebServiceResponse<T> object ready for the
  result to be plugged in.
  
  @param response
  The response containing the response metadata to pull out.
  
  @return A new, populated AmazonWebServiceResponse<T> object, ready for
  the result to be plugged in.