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

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

    if (other.getApplicationName() == null ^ this.getApplicationName() == null) return false;
    if (other.getApplicationName() != null
        && other.getApplicationName().equals(this.getApplicationName()) == false) return false;
    if (other.getVersionLabel() == null ^ this.getVersionLabel() == null) return false;
    if (other.getVersionLabel() != null
        && other.getVersionLabel().equals(this.getVersionLabel()) == false) return false;
    if (other.getTemplateName() == null ^ this.getTemplateName() == null) return false;
    if (other.getTemplateName() != null
        && other.getTemplateName().equals(this.getTemplateName()) == false) return false;
    if (other.getEnvironmentId() == null ^ this.getEnvironmentId() == null) return false;
    if (other.getEnvironmentId() != null
        && other.getEnvironmentId().equals(this.getEnvironmentId()) == false) return false;
    if (other.getEnvironmentName() == null ^ this.getEnvironmentName() == null) return false;
    if (other.getEnvironmentName() != null
        && other.getEnvironmentName().equals(this.getEnvironmentName()) == false) return false;
    if (other.getRequestId() == null ^ this.getRequestId() == null) return false;
    if (other.getRequestId() != null && other.getRequestId().equals(this.getRequestId()) == false)
      return false;
    if (other.getSeverity() == null ^ this.getSeverity() == null) return false;
    if (other.getSeverity() != null && other.getSeverity().equals(this.getSeverity()) == 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.getMaxRecords() == null ^ this.getMaxRecords() == null) return false;
    if (other.getMaxRecords() != null
        && other.getMaxRecords().equals(this.getMaxRecords()) == false) return false;
    if (other.getNextToken() == null ^ this.getNextToken() == null) return false;
    if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
      return false;
    return true;
  }
  public Request<DescribeEventsRequest> marshall(DescribeEventsRequest describeEventsRequest) {

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

    Request<DescribeEventsRequest> request =
        new DefaultRequest<DescribeEventsRequest>(describeEventsRequest, "AWSElasticBeanstalk");
    request.addParameter("Action", "DescribeEvents");
    request.addParameter("Version", "2010-12-01");

    if (describeEventsRequest.getApplicationName() != null) {
      request.addParameter(
          "ApplicationName", StringUtils.fromString(describeEventsRequest.getApplicationName()));
    }
    if (describeEventsRequest.getVersionLabel() != null) {
      request.addParameter(
          "VersionLabel", StringUtils.fromString(describeEventsRequest.getVersionLabel()));
    }
    if (describeEventsRequest.getTemplateName() != null) {
      request.addParameter(
          "TemplateName", StringUtils.fromString(describeEventsRequest.getTemplateName()));
    }
    if (describeEventsRequest.getEnvironmentId() != null) {
      request.addParameter(
          "EnvironmentId", StringUtils.fromString(describeEventsRequest.getEnvironmentId()));
    }
    if (describeEventsRequest.getEnvironmentName() != null) {
      request.addParameter(
          "EnvironmentName", StringUtils.fromString(describeEventsRequest.getEnvironmentName()));
    }
    if (describeEventsRequest.getRequestId() != null) {
      request.addParameter(
          "RequestId", StringUtils.fromString(describeEventsRequest.getRequestId()));
    }
    if (describeEventsRequest.getSeverity() != null) {
      request.addParameter("Severity", StringUtils.fromString(describeEventsRequest.getSeverity()));
    }
    if (describeEventsRequest.getStartTime() != null) {
      request.addParameter("StartTime", StringUtils.fromDate(describeEventsRequest.getStartTime()));
    }
    if (describeEventsRequest.getEndTime() != null) {
      request.addParameter("EndTime", StringUtils.fromDate(describeEventsRequest.getEndTime()));
    }
    if (describeEventsRequest.getMaxRecords() != null) {
      request.addParameter(
          "MaxRecords", StringUtils.fromInteger(describeEventsRequest.getMaxRecords()));
    }
    if (describeEventsRequest.getNextToken() != null) {
      request.addParameter(
          "NextToken", StringUtils.fromString(describeEventsRequest.getNextToken()));
    }

    return request;
  }