@Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;

    if (obj instanceof DescribeReservedDBInstancesRequest == false) return false;
    DescribeReservedDBInstancesRequest other = (DescribeReservedDBInstancesRequest) obj;

    if (other.getReservedDBInstanceId() == null ^ this.getReservedDBInstanceId() == null)
      return false;
    if (other.getReservedDBInstanceId() != null
        && other.getReservedDBInstanceId().equals(this.getReservedDBInstanceId()) == false)
      return false;
    if (other.getReservedDBInstancesOfferingId() == null
        ^ this.getReservedDBInstancesOfferingId() == null) return false;
    if (other.getReservedDBInstancesOfferingId() != null
        && other.getReservedDBInstancesOfferingId().equals(this.getReservedDBInstancesOfferingId())
            == false) return false;
    if (other.getDBInstanceClass() == null ^ this.getDBInstanceClass() == null) return false;
    if (other.getDBInstanceClass() != null
        && other.getDBInstanceClass().equals(this.getDBInstanceClass()) == false) return false;
    if (other.getDuration() == null ^ this.getDuration() == null) return false;
    if (other.getDuration() != null && other.getDuration().equals(this.getDuration()) == false)
      return false;
    if (other.getProductDescription() == null ^ this.getProductDescription() == null) return false;
    if (other.getProductDescription() != null
        && other.getProductDescription().equals(this.getProductDescription()) == false)
      return false;
    if (other.getOfferingType() == null ^ this.getOfferingType() == null) return false;
    if (other.getOfferingType() != null
        && other.getOfferingType().equals(this.getOfferingType()) == false) return false;
    if (other.isMultiAZ() == null ^ this.isMultiAZ() == null) return false;
    if (other.isMultiAZ() != null && other.isMultiAZ().equals(this.isMultiAZ()) == false)
      return false;
    if (other.getFilters() == null ^ this.getFilters() == null) return false;
    if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false)
      return false;
    if (other.getMaxRecords() == null ^ this.getMaxRecords() == null) return false;
    if (other.getMaxRecords() != null
        && other.getMaxRecords().equals(this.getMaxRecords()) == false) return false;
    if (other.getMarker() == null ^ this.getMarker() == null) return false;
    if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false)
      return false;
    return true;
  }
  public Request<DescribeReservedDBInstancesRequest> marshall(
      DescribeReservedDBInstancesRequest describeReservedDBInstancesRequest) {

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

    Request<DescribeReservedDBInstancesRequest> request =
        new DefaultRequest<DescribeReservedDBInstancesRequest>(
            describeReservedDBInstancesRequest, "AmazonRDS");
    request.addParameter("Action", "DescribeReservedDBInstances");
    request.addParameter("Version", "2013-09-09");

    if (describeReservedDBInstancesRequest.getReservedDBInstanceId() != null) {
      request.addParameter(
          "ReservedDBInstanceId",
          StringUtils.fromString(describeReservedDBInstancesRequest.getReservedDBInstanceId()));
    }
    if (describeReservedDBInstancesRequest.getReservedDBInstancesOfferingId() != null) {
      request.addParameter(
          "ReservedDBInstancesOfferingId",
          StringUtils.fromString(
              describeReservedDBInstancesRequest.getReservedDBInstancesOfferingId()));
    }
    if (describeReservedDBInstancesRequest.getDBInstanceClass() != null) {
      request.addParameter(
          "DBInstanceClass",
          StringUtils.fromString(describeReservedDBInstancesRequest.getDBInstanceClass()));
    }
    if (describeReservedDBInstancesRequest.getDuration() != null) {
      request.addParameter(
          "Duration", StringUtils.fromString(describeReservedDBInstancesRequest.getDuration()));
    }
    if (describeReservedDBInstancesRequest.getProductDescription() != null) {
      request.addParameter(
          "ProductDescription",
          StringUtils.fromString(describeReservedDBInstancesRequest.getProductDescription()));
    }
    if (describeReservedDBInstancesRequest.getOfferingType() != null) {
      request.addParameter(
          "OfferingType",
          StringUtils.fromString(describeReservedDBInstancesRequest.getOfferingType()));
    }
    if (describeReservedDBInstancesRequest.isMultiAZ() != null) {
      request.addParameter(
          "MultiAZ", StringUtils.fromBoolean(describeReservedDBInstancesRequest.isMultiAZ()));
    }

    java.util.List<Filter> filtersList = describeReservedDBInstancesRequest.getFilters();
    int filtersListIndex = 1;

    for (Filter filtersListValue : filtersList) {
      Filter filterMember = filtersListValue;
      if (filterMember != null) {
        if (filterMember.getFilterName() != null) {
          request.addParameter(
              "Filters.Filter." + filtersListIndex + ".FilterName",
              StringUtils.fromString(filterMember.getFilterName()));
        }

        java.util.List<String> filterValueList = filterMember.getFilterValue();
        int filterValueListIndex = 1;

        for (String filterValueListValue : filterValueList) {
          if (filterValueListValue != null) {
            request.addParameter(
                "Filters.Filter." + filtersListIndex + ".FilterValue.Value." + filterValueListIndex,
                StringUtils.fromString(filterValueListValue));
          }

          filterValueListIndex++;
        }
      }

      filtersListIndex++;
    }
    if (describeReservedDBInstancesRequest.getMaxRecords() != null) {
      request.addParameter(
          "MaxRecords",
          StringUtils.fromInteger(describeReservedDBInstancesRequest.getMaxRecords()));
    }
    if (describeReservedDBInstancesRequest.getMarker() != null) {
      request.addParameter(
          "Marker", StringUtils.fromString(describeReservedDBInstancesRequest.getMarker()));
    }

    return request;
  }