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

    if (obj instanceof DestinationDescription == false) return false;
    DestinationDescription other = (DestinationDescription) obj;
    if (other.getDestinationId() == null ^ this.getDestinationId() == null) return false;
    if (other.getDestinationId() != null
        && other.getDestinationId().equals(this.getDestinationId()) == false) return false;
    if (other.getS3DestinationDescription() == null ^ this.getS3DestinationDescription() == null)
      return false;
    if (other.getS3DestinationDescription() != null
        && other.getS3DestinationDescription().equals(this.getS3DestinationDescription()) == false)
      return false;
    if (other.getRedshiftDestinationDescription() == null
        ^ this.getRedshiftDestinationDescription() == null) return false;
    if (other.getRedshiftDestinationDescription() != null
        && other
                .getRedshiftDestinationDescription()
                .equals(this.getRedshiftDestinationDescription())
            == false) return false;
    return true;
  }
  /** Marshall the given parameter object, and output to a SdkJsonGenerator */
  public void marshall(
      DestinationDescription destinationDescription, StructuredJsonGenerator jsonGenerator) {

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

    try {
      jsonGenerator.writeStartObject();

      if (destinationDescription.getDestinationId() != null) {
        jsonGenerator
            .writeFieldName("DestinationId")
            .writeValue(destinationDescription.getDestinationId());
      }
      if (destinationDescription.getS3DestinationDescription() != null) {
        jsonGenerator.writeFieldName("S3DestinationDescription");
        S3DestinationDescriptionJsonMarshaller.getInstance()
            .marshall(destinationDescription.getS3DestinationDescription(), jsonGenerator);
      }
      if (destinationDescription.getRedshiftDestinationDescription() != null) {
        jsonGenerator.writeFieldName("RedshiftDestinationDescription");
        RedshiftDestinationDescriptionJsonMarshaller.getInstance()
            .marshall(destinationDescription.getRedshiftDestinationDescription(), jsonGenerator);
      }
      if (destinationDescription.getElasticsearchDestinationDescription() != null) {
        jsonGenerator.writeFieldName("ElasticsearchDestinationDescription");
        ElasticsearchDestinationDescriptionJsonMarshaller.getInstance()
            .marshall(
                destinationDescription.getElasticsearchDestinationDescription(), jsonGenerator);
      }

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