public Request<DescribeNFSFileSharesRequest> marshall(
      DescribeNFSFileSharesRequest describeNFSFileSharesRequest) {

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

    Request<DescribeNFSFileSharesRequest> request =
        new DefaultRequest<DescribeNFSFileSharesRequest>(
            describeNFSFileSharesRequest, "AWSStorageGateway");
    request.addHeader("X-Amz-Target", "StorageGateway_20130630.DescribeNFSFileShares");

    request.setHttpMethod(HttpMethodName.POST);

    request.setResourcePath("");

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

      jsonGenerator.writeStartObject();

      com.amazonaws.internal.SdkInternalList<String> fileShareARNListList =
          (com.amazonaws.internal.SdkInternalList<String>)
              describeNFSFileSharesRequest.getFileShareARNList();
      if (!fileShareARNListList.isEmpty() || !fileShareARNListList.isAutoConstruct()) {
        jsonGenerator.writeFieldName("FileShareARNList");
        jsonGenerator.writeStartArray();
        for (String fileShareARNListListValue : fileShareARNListList) {
          if (fileShareARNListListValue != null) {
            jsonGenerator.writeValue(fileShareARNListListValue);
          }
        }
        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", protocolFactory.getContentType());
    } catch (Throwable t) {
      throw new SdkClientException("Unable to marshall request to JSON: " + t.getMessage(), t);
    }

    return request;
  }
  public Request<DeleteFileShareRequest> marshall(DeleteFileShareRequest deleteFileShareRequest) {

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

    Request<DeleteFileShareRequest> request =
        new DefaultRequest<DeleteFileShareRequest>(deleteFileShareRequest, "AWSStorageGateway");
    request.addHeader("X-Amz-Target", "StorageGateway_20130630.DeleteFileShare");

    request.setHttpMethod(HttpMethodName.POST);

    request.setResourcePath("");

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

      jsonGenerator.writeStartObject();

      if (deleteFileShareRequest.getFileShareARN() != null) {
        jsonGenerator
            .writeFieldName("FileShareARN")
            .writeValue(deleteFileShareRequest.getFileShareARN());
      }

      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 SdkClientException("Unable to marshall request to JSON: " + t.getMessage(), t);
    }

    return request;
  }