public Request<GetComplianceSummaryByResourceTypeRequest> marshall(
      GetComplianceSummaryByResourceTypeRequest getComplianceSummaryByResourceTypeRequest) {

    if (getComplianceSummaryByResourceTypeRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<GetComplianceSummaryByResourceTypeRequest> request =
        new DefaultRequest<GetComplianceSummaryByResourceTypeRequest>(
            getComplianceSummaryByResourceTypeRequest, "AmazonConfig");
    request.addHeader("X-Amz-Target", "StarlingDoveService.GetComplianceSummaryByResourceType");

    request.setHttpMethod(HttpMethodName.POST);

    request.setResourcePath("");

    try {
      final StructuredJsonGenerator jsonGenerator = protocolFactory.createGenerator();

      jsonGenerator.writeStartObject();

      com.amazonaws.internal.SdkInternalList<String> resourceTypesList =
          (com.amazonaws.internal.SdkInternalList<String>)
              getComplianceSummaryByResourceTypeRequest.getResourceTypes();
      if (!resourceTypesList.isEmpty() || !resourceTypesList.isAutoConstruct()) {
        jsonGenerator.writeFieldName("ResourceTypes");
        jsonGenerator.writeStartArray();
        for (String resourceTypesListValue : resourceTypesList) {
          if (resourceTypesListValue != null) {
            jsonGenerator.writeValue(resourceTypesListValue);
          }
        }
        jsonGenerator.writeEndArray();
      }

      jsonGenerator.writeEndObject();

      byte[] content = jsonGenerator.getBytes();
      request.setContent(new ByteArrayInputStream(content));
      request.addHeader("Content-Length", Integer.toString(content.length));
      request.addHeader("Content-Type", jsonGenerator.getContentType());
    } catch (Throwable t) {
      throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);
    }

    return request;
  }
  public Request<DeleteDeliveryChannelRequest> marshall(
      DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) {

    if (deleteDeliveryChannelRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<DeleteDeliveryChannelRequest> request =
        new DefaultRequest<DeleteDeliveryChannelRequest>(
            deleteDeliveryChannelRequest, "AmazonConfig");
    request.addHeader("X-Amz-Target", "StarlingDoveService.DeleteDeliveryChannel");

    request.setHttpMethod(HttpMethodName.POST);

    request.setResourcePath("");

    try {
      final StructuredJsonGenerator jsonGenerator = protocolFactory.createGenerator();

      jsonGenerator.writeStartObject();

      if (deleteDeliveryChannelRequest.getDeliveryChannelName() != null) {
        jsonGenerator
            .writeFieldName("DeliveryChannelName")
            .writeValue(deleteDeliveryChannelRequest.getDeliveryChannelName());
      }

      jsonGenerator.writeEndObject();

      byte[] content = jsonGenerator.getBytes();
      request.setContent(new ByteArrayInputStream(content));
      request.addHeader("Content-Length", Integer.toString(content.length));
      request.addHeader("Content-Type", protocolFactory.getContentType());
    } catch (Throwable t) {
      throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);
    }

    return request;
  }