content: /*
   * Copyright (c) 2020-2025 Airbyte, Inc., all rights reserved.
   */
  
  package io.airbyte.config;
  
  import com.fasterxml.jackson.annotation.JsonAnyGetter;
  import com.fasterxml.jackson.annotation.JsonAnySetter;
  import com.fasterxml.jackson.annotation.JsonCreator;
  import com.fasterxml.jackson.annotation.JsonIgnore;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonValue;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.HashMap;
  import java.util.Map;
  
  /**
   * StreamTransform
   * <p>
   *
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "transformType",
    "streamDescriptor",
    "updateStream"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class StreamTransform implements Serializable {
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("transformType")
    private TransformType transformType;
    /**
     * StreamDescriptor
     * <p>
     *
     * (Required)
     *
     */
    @JsonProperty("streamDescriptor")
    private StreamDescriptor streamDescriptor;
    @JsonProperty("updateStream")
    private UpdateStream updateStream;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = -3112544065989320643L;
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("transformType")
    public TransformType getTransformType() {
      return transformType;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("transformType")
    public void setTransformType(TransformType transformType) {
      this.transformType = transformType;
    }
  
    public StreamTransform withTransformType(TransformType transformType) {
      this.transformType = transformType;
      return this;
    }
  
    /**
     * StreamDescriptor
     * <p>
     *
     * (Required)
     *
     */
    @JsonProperty("streamDescriptor")
    public StreamDescriptor getStreamDescriptor() {
      return streamDescriptor;
    }
  
    /**
     * StreamDescriptor
     * <p>
     *
     * (Required)
     *
     */
    @JsonProperty("streamDescriptor")
    public void setStreamDescriptor(StreamDescriptor streamDescriptor) {
      this.streamDescriptor = streamDescriptor;
    }
  
    public StreamTransform withStreamDescriptor(StreamDescriptor streamDescriptor) {
      this.streamDescriptor = streamDescriptor;
      return this;
    }
  
    @JsonProperty("updateStream")
    public UpdateStream getUpdateStream() {
      return updateStream;
    }
  
    @JsonProperty("updateStream")
    public void setUpdateStream(UpdateStream updateStream) {
      this.updateStream = updateStream;
    }
  
    public StreamTransform withUpdateStream(UpdateStream updateStream) {
      this.updateStream = updateStream;
      return this;
    }
  
    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
      return this.additionalProperties;
    }
  
    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
    }
  
    public StreamTransform withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(StreamTransform.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("transformType");
      sb.append('=');
      sb.append(((this.transformType == null) ? "<null>" : this.transformType));
      sb.append(',');
      sb.append("streamDescriptor");
      sb.append('=');
      sb.append(((this.streamDescriptor == null) ? "<null>" : this.streamDescriptor));
      sb.append(',');
      sb.append("updateStream");
      sb.append('=');
      sb.append(((this.updateStream == null) ? "<null>" : this.updateStream));
      sb.append(',');
      sb.append("additionalProperties");
      sb.append('=');
      sb.append(((this.additionalProperties == null) ? "<null>" : this.additionalProperties));
      sb.append(',');
      if (sb.charAt((sb.length() - 1)) == ',') {
        sb.setCharAt((sb.length() - 1), ']');
      } else {
        sb.append(']');
      }
      return sb.toString();
    }
  
    @Override
    public int hashCode() {
      int result = 1;
      result = ((result * 31) + ((this.streamDescriptor == null) ? 0 : this.streamDescriptor.hashCode()));
      result = ((result * 31) + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode()));
      result = ((result * 31) + ((this.transformType == null) ? 0 : this.transformType.hashCode()));
      result = ((result * 31) + ((this.updateStream == null) ? 0 : this.updateStream.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof StreamTransform) == false) {
        return false;
      }
      StreamTransform rhs = ((StreamTransform) other);
      return (((((this.streamDescriptor == rhs.streamDescriptor)
          || ((this.streamDescriptor != null) && this.streamDescriptor.equals(rhs.streamDescriptor)))
          && ((this.additionalProperties == rhs.additionalProperties)
              || ((this.additionalProperties != null) && this.additionalProperties.equals(rhs.additionalProperties))))
          && ((this.transformType == rhs.transformType) || ((this.transformType != null) && this.transformType.equals(rhs.transformType))))
          && ((this.updateStream == rhs.updateStream) || ((this.updateStream != null) && this.updateStream.equals(rhs.updateStream))));
    }
  
    public enum TransformType {
  
      ADD_STREAM("add_stream"),
      REMOVE_STREAM("remove_stream"),
      UPDATE_STREAM("update_stream");
  
      private final String value;
      private final static Map<String, TransformType> CONSTANTS = new HashMap<String, TransformType>();
  
      static {
        for (TransformType c : values()) {
          CONSTANTS.put(c.value, c);
        }
      }
  
      private TransformType(String value) {
        this.value = value;
      }
  
      @Override
      public String toString() {
        return this.value;
      }
  
      @JsonValue
      public String value() {
        return this.value;
      }
  
      @JsonCreator
      public static TransformType fromValue(String value) {
        TransformType constant = CONSTANTS.get(value);
        if (constant == null) {
          throw new IllegalArgumentException(value);
        } else {
          return constant;
        }
      }
  
    }
  
  }
  