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.JsonPropertyDescription;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonValue;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  
  /**
   * BreakingChangeScope
   * <p>
   * A scope that can be used to limit the impact of a breaking change
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "scopeType",
    "impactedScopes"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class BreakingChangeScope implements Serializable {
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("scopeType")
    private ScopeType scopeType;
    /**
     * List of scope values (e.g. stream names) that are impacted by the breaking change. Type of the
     * array values is polymorphic based on the scope type. (Required)
     *
     */
    @JsonProperty("impactedScopes")
    @JsonPropertyDescription("List of scope values (e.g. stream names) that are impacted by the breaking change. Type of the array values is polymorphic based on the scope type.")
    private List<Object> impactedScopes = new ArrayList<Object>();
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = 6608225673418434738L;
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("scopeType")
    public ScopeType getScopeType() {
      return scopeType;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("scopeType")
    public void setScopeType(ScopeType scopeType) {
      this.scopeType = scopeType;
    }
  
    public BreakingChangeScope withScopeType(ScopeType scopeType) {
      this.scopeType = scopeType;
      return this;
    }
  
    /**
     * List of scope values (e.g. stream names) that are impacted by the breaking change. Type of the
     * array values is polymorphic based on the scope type. (Required)
     *
     */
    @JsonProperty("impactedScopes")
    public List<Object> getImpactedScopes() {
      return impactedScopes;
    }
  
    /**
     * List of scope values (e.g. stream names) that are impacted by the breaking change. Type of the
     * array values is polymorphic based on the scope type. (Required)
     *
     */
    @JsonProperty("impactedScopes")
    public void setImpactedScopes(List<Object> impactedScopes) {
      this.impactedScopes = impactedScopes;
    }
  
    public BreakingChangeScope withImpactedScopes(List<Object> impactedScopes) {
      this.impactedScopes = impactedScopes;
      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 BreakingChangeScope withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(BreakingChangeScope.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("scopeType");
      sb.append('=');
      sb.append(((this.scopeType == null) ? "<null>" : this.scopeType));
      sb.append(',');
      sb.append("impactedScopes");
      sb.append('=');
      sb.append(((this.impactedScopes == null) ? "<null>" : this.impactedScopes));
      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.scopeType == null) ? 0 : this.scopeType.hashCode()));
      result = ((result * 31) + ((this.impactedScopes == null) ? 0 : this.impactedScopes.hashCode()));
      result = ((result * 31) + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof BreakingChangeScope) == false) {
        return false;
      }
      BreakingChangeScope rhs = ((BreakingChangeScope) other);
      return ((((this.scopeType == rhs.scopeType) || ((this.scopeType != null) && this.scopeType.equals(rhs.scopeType)))
          && ((this.impactedScopes == rhs.impactedScopes) || ((this.impactedScopes != null) && this.impactedScopes.equals(rhs.impactedScopes))))
          && ((this.additionalProperties == rhs.additionalProperties)
              || ((this.additionalProperties != null) && this.additionalProperties.equals(rhs.additionalProperties))));
    }
  
    public enum ScopeType {
  
      STREAM("stream");
  
      private final String value;
      private final static Map<String, ScopeType> CONSTANTS = new HashMap<String, ScopeType>();
  
      static {
        for (ScopeType c : values()) {
          CONSTANTS.put(c.value, c);
        }
      }
  
      private ScopeType(String value) {
        this.value = value;
      }
  
      @Override
      public String toString() {
        return this.value;
      }
  
      @JsonValue
      public String value() {
        return this.value;
      }
  
      @JsonCreator
      public static ScopeType fromValue(String value) {
        ScopeType constant = CONSTANTS.get(value);
        if (constant == null) {
          throw new IllegalArgumentException(value);
        } else {
          return constant;
        }
      }
  
    }
  
  }
  