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

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

    if (other.getInstances() == null ^ this.getInstances() == null) return false;
    if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false)
      return false;
    if (other.getStatus() == null ^ this.getStatus() == null) return false;
    if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
      return false;
    if (other.getStartTime() == null ^ this.getStartTime() == null) return false;
    if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false)
      return false;
    if (other.getEndTime() == null ^ this.getEndTime() == null) return false;
    if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false)
      return false;
    if (other.getReasonCodes() == null ^ this.getReasonCodes() == null) return false;
    if (other.getReasonCodes() != null
        && other.getReasonCodes().equals(this.getReasonCodes()) == false) return false;
    if (other.getDescription() == null ^ this.getDescription() == null) return false;
    if (other.getDescription() != null
        && other.getDescription().equals(this.getDescription()) == false) return false;
    return true;
  }
  public Request<ReportInstanceStatusRequest> marshall(
      ReportInstanceStatusRequest reportInstanceStatusRequest) {

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

    Request<ReportInstanceStatusRequest> request =
        new DefaultRequest<ReportInstanceStatusRequest>(reportInstanceStatusRequest, "AmazonEC2");
    request.addParameter("Action", "ReportInstanceStatus");
    request.addParameter("Version", "2012-12-01");

    java.util.List<String> instancesList = reportInstanceStatusRequest.getInstances();
    int instancesListIndex = 1;

    for (String instancesListValue : instancesList) {
      if (instancesListValue != null) {
        request.addParameter(
            "InstanceId." + instancesListIndex, StringUtils.fromString(instancesListValue));
      }

      instancesListIndex++;
    }
    if (reportInstanceStatusRequest.getStatus() != null) {
      request.addParameter(
          "Status", StringUtils.fromString(reportInstanceStatusRequest.getStatus()));
    }
    if (reportInstanceStatusRequest.getStartTime() != null) {
      request.addParameter(
          "StartTime", StringUtils.fromDate(reportInstanceStatusRequest.getStartTime()));
    }
    if (reportInstanceStatusRequest.getEndTime() != null) {
      request.addParameter(
          "EndTime", StringUtils.fromDate(reportInstanceStatusRequest.getEndTime()));
    }

    java.util.List<String> reasonCodesList = reportInstanceStatusRequest.getReasonCodes();
    int reasonCodesListIndex = 1;

    for (String reasonCodesListValue : reasonCodesList) {
      if (reasonCodesListValue != null) {
        request.addParameter(
            "ReasonCode." + reasonCodesListIndex, StringUtils.fromString(reasonCodesListValue));
      }

      reasonCodesListIndex++;
    }
    if (reportInstanceStatusRequest.getDescription() != null) {
      request.addParameter(
          "Description", StringUtils.fromString(reportInstanceStatusRequest.getDescription()));
    }

    return request;
  }
  public Request<ReportInstanceStatusRequest> marshall(
      ReportInstanceStatusRequest reportInstanceStatusRequest) {

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

    Request<ReportInstanceStatusRequest> request =
        new DefaultRequest<ReportInstanceStatusRequest>(reportInstanceStatusRequest, "AmazonEC2");
    request.addParameter("Action", "ReportInstanceStatus");
    request.addParameter("Version", "2016-04-01");
    request.setHttpMethod(HttpMethodName.POST);

    com.amazonaws.internal.SdkInternalList<String> instancesList =
        (com.amazonaws.internal.SdkInternalList<String>) reportInstanceStatusRequest.getInstances();
    if (!instancesList.isEmpty() || !instancesList.isAutoConstruct()) {
      int instancesListIndex = 1;

      for (String instancesListValue : instancesList) {
        if (instancesListValue != null) {
          request.addParameter(
              "InstanceId." + instancesListIndex, StringUtils.fromString(instancesListValue));
        }
        instancesListIndex++;
      }
    }

    if (reportInstanceStatusRequest.getStatus() != null) {
      request.addParameter(
          "Status", StringUtils.fromString(reportInstanceStatusRequest.getStatus()));
    }

    if (reportInstanceStatusRequest.getStartTime() != null) {
      request.addParameter(
          "StartTime", StringUtils.fromDate(reportInstanceStatusRequest.getStartTime()));
    }

    if (reportInstanceStatusRequest.getEndTime() != null) {
      request.addParameter(
          "EndTime", StringUtils.fromDate(reportInstanceStatusRequest.getEndTime()));
    }

    com.amazonaws.internal.SdkInternalList<String> reasonCodesList =
        (com.amazonaws.internal.SdkInternalList<String>)
            reportInstanceStatusRequest.getReasonCodes();
    if (!reasonCodesList.isEmpty() || !reasonCodesList.isAutoConstruct()) {
      int reasonCodesListIndex = 1;

      for (String reasonCodesListValue : reasonCodesList) {
        if (reasonCodesListValue != null) {
          request.addParameter(
              "ReasonCode." + reasonCodesListIndex, StringUtils.fromString(reasonCodesListValue));
        }
        reasonCodesListIndex++;
      }
    }

    if (reportInstanceStatusRequest.getDescription() != null) {
      request.addParameter(
          "Description", StringUtils.fromString(reportInstanceStatusRequest.getDescription()));
    }

    return request;
  }