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

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

    if (other.getInstanceCount() == null ^ this.getInstanceCount() == null) return false;
    if (other.getInstanceCount() != null
        && other.getInstanceCount().equals(this.getInstanceCount()) == false) return false;
    if (other.getThresholdsWaitTime() == null ^ this.getThresholdsWaitTime() == null) return false;
    if (other.getThresholdsWaitTime() != null
        && other.getThresholdsWaitTime().equals(this.getThresholdsWaitTime()) == false)
      return false;
    if (other.getIgnoreMetricsTime() == null ^ this.getIgnoreMetricsTime() == null) return false;
    if (other.getIgnoreMetricsTime() != null
        && other.getIgnoreMetricsTime().equals(this.getIgnoreMetricsTime()) == false) return false;
    if (other.getCpuThreshold() == null ^ this.getCpuThreshold() == null) return false;
    if (other.getCpuThreshold() != null
        && other.getCpuThreshold().equals(this.getCpuThreshold()) == false) return false;
    if (other.getMemoryThreshold() == null ^ this.getMemoryThreshold() == null) return false;
    if (other.getMemoryThreshold() != null
        && other.getMemoryThreshold().equals(this.getMemoryThreshold()) == false) return false;
    if (other.getLoadThreshold() == null ^ this.getLoadThreshold() == null) return false;
    if (other.getLoadThreshold() != null
        && other.getLoadThreshold().equals(this.getLoadThreshold()) == false) return false;
    return true;
  }
  /** Marshall the given parameter object, and output to a SdkJsonGenerator */
  public void marshall(
      AutoScalingThresholds autoScalingThresholds, StructuredJsonGenerator jsonGenerator) {

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

    try {
      jsonGenerator.writeStartObject();

      if (autoScalingThresholds.getInstanceCount() != null) {
        jsonGenerator
            .writeFieldName("InstanceCount")
            .writeValue(autoScalingThresholds.getInstanceCount());
      }
      if (autoScalingThresholds.getThresholdsWaitTime() != null) {
        jsonGenerator
            .writeFieldName("ThresholdsWaitTime")
            .writeValue(autoScalingThresholds.getThresholdsWaitTime());
      }
      if (autoScalingThresholds.getIgnoreMetricsTime() != null) {
        jsonGenerator
            .writeFieldName("IgnoreMetricsTime")
            .writeValue(autoScalingThresholds.getIgnoreMetricsTime());
      }
      if (autoScalingThresholds.getCpuThreshold() != null) {
        jsonGenerator
            .writeFieldName("CpuThreshold")
            .writeValue(autoScalingThresholds.getCpuThreshold());
      }
      if (autoScalingThresholds.getMemoryThreshold() != null) {
        jsonGenerator
            .writeFieldName("MemoryThreshold")
            .writeValue(autoScalingThresholds.getMemoryThreshold());
      }
      if (autoScalingThresholds.getLoadThreshold() != null) {
        jsonGenerator
            .writeFieldName("LoadThreshold")
            .writeValue(autoScalingThresholds.getLoadThreshold());
      }

      com.amazonaws.internal.SdkInternalList<String> alarmsList =
          (com.amazonaws.internal.SdkInternalList<String>) autoScalingThresholds.getAlarms();
      if (!alarmsList.isEmpty() || !alarmsList.isAutoConstruct()) {
        jsonGenerator.writeFieldName("Alarms");
        jsonGenerator.writeStartArray();
        for (String alarmsListValue : alarmsList) {
          if (alarmsListValue != null) {
            jsonGenerator.writeValue(alarmsListValue);
          }
        }
        jsonGenerator.writeEndArray();
      }

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