public Request<DescribeConfigurationsRequest> marshall(
      DescribeConfigurationsRequest describeConfigurationsRequest) {

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

    Request<DescribeConfigurationsRequest> request =
        new DefaultRequest<DescribeConfigurationsRequest>(
            describeConfigurationsRequest, "AWSApplicationDiscovery");
    request.addHeader("X-Amz-Target", "AWSPoseidonService_V2015_11_01.DescribeConfigurations");

    request.setHttpMethod(HttpMethodName.POST);

    request.setResourcePath("");

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

      jsonGenerator.writeStartObject();

      java.util.List<String> configurationIdsList =
          describeConfigurationsRequest.getConfigurationIds();
      if (configurationIdsList != null) {
        jsonGenerator.writeFieldName("configurationIds");
        jsonGenerator.writeStartArray();
        for (String configurationIdsListValue : configurationIdsList) {
          if (configurationIdsListValue != null) {
            jsonGenerator.writeValue(configurationIdsListValue);
          }
        }
        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;
  }
  /** Marshall the given parameter object, and output to a SdkJsonGenerator */
  public void marshall(ConfigurationTag configurationTag, StructuredJsonGenerator jsonGenerator) {

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

    try {
      jsonGenerator.writeStartObject();

      if (configurationTag.getConfigurationType() != null) {
        jsonGenerator
            .writeFieldName("configurationType")
            .writeValue(configurationTag.getConfigurationType());
      }
      if (configurationTag.getConfigurationId() != null) {
        jsonGenerator
            .writeFieldName("configurationId")
            .writeValue(configurationTag.getConfigurationId());
      }
      if (configurationTag.getKey() != null) {
        jsonGenerator.writeFieldName("key").writeValue(configurationTag.getKey());
      }
      if (configurationTag.getValue() != null) {
        jsonGenerator.writeFieldName("value").writeValue(configurationTag.getValue());
      }
      if (configurationTag.getTimeOfCreation() != null) {
        jsonGenerator
            .writeFieldName("timeOfCreation")
            .writeValue(configurationTag.getTimeOfCreation());
      }

      jsonGenerator.writeEndObject();
    } catch (Throwable t) {
      throw new SdkClientException("Unable to marshall request to JSON: " + t.getMessage(), t);
    }
  }