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.JsonIgnore;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.fasterxml.jackson.annotation.JsonPropertyDescription;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.HashMap;
  import java.util.Map;
  
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "connectorVersion",
    "airbyteVersion",
    "blocked"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class CompatibilityRule implements Serializable {
  
    /**
     * The connector version(s) that is only compatible with a given platform version(s). This may be an
     * exact version number or a semver range expression.
     *
     */
    @JsonProperty("connectorVersion")
    @JsonPropertyDescription("The connector version(s) that is only compatible with a given platform version(s).  This may be an exact version number or a semver range expression.")
    private String connectorVersion;
    /**
     * The airbyte version(s) that the specified connector version(s) is compatible with. This may be an
     * exact version number or a semver range expression.
     *
     */
    @JsonProperty("airbyteVersion")
    @JsonPropertyDescription("The airbyte version(s) that the specified connector version(s) is compatible with.  This may be an exact version number or a semver range expression.")
    private String airbyteVersion;
    /**
     * The connector version(s) is blocked from upgrade, regardless of airbyte version.
     *
     */
    @JsonProperty("blocked")
    @JsonPropertyDescription("The connector version(s) is blocked from upgrade, regardless of airbyte version.")
    private Boolean blocked = false;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = 8443724404093895704L;
  
    /**
     * The connector version(s) that is only compatible with a given platform version(s). This may be an
     * exact version number or a semver range expression.
     *
     */
    @JsonProperty("connectorVersion")
    public String getConnectorVersion() {
      return connectorVersion;
    }
  
    /**
     * The connector version(s) that is only compatible with a given platform version(s). This may be an
     * exact version number or a semver range expression.
     *
     */
    @JsonProperty("connectorVersion")
    public void setConnectorVersion(String connectorVersion) {
      this.connectorVersion = connectorVersion;
    }
  
    public CompatibilityRule withConnectorVersion(String connectorVersion) {
      this.connectorVersion = connectorVersion;
      return this;
    }
  
    /**
     * The airbyte version(s) that the specified connector version(s) is compatible with. This may be an
     * exact version number or a semver range expression.
     *
     */
    @JsonProperty("airbyteVersion")
    public String getAirbyteVersion() {
      return airbyteVersion;
    }
  
    /**
     * The airbyte version(s) that the specified connector version(s) is compatible with. This may be an
     * exact version number or a semver range expression.
     *
     */
    @JsonProperty("airbyteVersion")
    public void setAirbyteVersion(String airbyteVersion) {
      this.airbyteVersion = airbyteVersion;
    }
  
    public CompatibilityRule withAirbyteVersion(String airbyteVersion) {
      this.airbyteVersion = airbyteVersion;
      return this;
    }
  
    /**
     * The connector version(s) is blocked from upgrade, regardless of airbyte version.
     *
     */
    @JsonProperty("blocked")
    public Boolean getBlocked() {
      return blocked;
    }
  
    /**
     * The connector version(s) is blocked from upgrade, regardless of airbyte version.
     *
     */
    @JsonProperty("blocked")
    public void setBlocked(Boolean blocked) {
      this.blocked = blocked;
    }
  
    public CompatibilityRule withBlocked(Boolean blocked) {
      this.blocked = blocked;
      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 CompatibilityRule withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(CompatibilityRule.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("connectorVersion");
      sb.append('=');
      sb.append(((this.connectorVersion == null) ? "<null>" : this.connectorVersion));
      sb.append(',');
      sb.append("airbyteVersion");
      sb.append('=');
      sb.append(((this.airbyteVersion == null) ? "<null>" : this.airbyteVersion));
      sb.append(',');
      sb.append("blocked");
      sb.append('=');
      sb.append(((this.blocked == null) ? "<null>" : this.blocked));
      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.connectorVersion == null) ? 0 : this.connectorVersion.hashCode()));
      result = ((result * 31) + ((this.airbyteVersion == null) ? 0 : this.airbyteVersion.hashCode()));
      result = ((result * 31) + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode()));
      result = ((result * 31) + ((this.blocked == null) ? 0 : this.blocked.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof CompatibilityRule) == false) {
        return false;
      }
      CompatibilityRule rhs = ((CompatibilityRule) other);
      return (((((this.connectorVersion == rhs.connectorVersion)
          || ((this.connectorVersion != null) && this.connectorVersion.equals(rhs.connectorVersion)))
          && ((this.airbyteVersion == rhs.airbyteVersion) || ((this.airbyteVersion != null) && this.airbyteVersion.equals(rhs.airbyteVersion))))
          && ((this.additionalProperties == rhs.additionalProperties)
              || ((this.additionalProperties != null) && this.additionalProperties.equals(rhs.additionalProperties))))
          && ((this.blocked == rhs.blocked) || ((this.blocked != null) && this.blocked.equals(rhs.blocked))));
    }
  
  }
  