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.HashMap;
  import java.util.Map;
  import java.util.UUID;
  
  /**
   * StandardSourceDefinition
   * <p>
   * describes a source
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "sourceDefinitionId",
    "defaultVersionId",
    "name",
    "icon",
    "iconUrl",
    "sourceType",
    "tombstone",
    "public",
    "custom",
    "enterprise",
    "resourceRequirements",
    "maxSecondsBetweenMessages",
    "metrics"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class StandardSourceDefinition implements Serializable {
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("sourceDefinitionId")
    private UUID sourceDefinitionId;
    @JsonProperty("defaultVersionId")
    private UUID defaultVersionId;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("name")
    private String name;
    @JsonProperty("icon")
    private String icon;
    @JsonProperty("iconUrl")
    private String iconUrl;
    @JsonProperty("sourceType")
    private SourceType sourceType;
    /**
     * if false, the configuration is active. if true, then this configuration is permanently off.
     *
     */
    @JsonProperty("tombstone")
    @JsonPropertyDescription("if false, the configuration is active. if true, then this configuration is permanently off.")
    private Boolean tombstone = false;
    /**
     * true if this connector definition is available to all workspaces
     *
     */
    @JsonProperty("public")
    @JsonPropertyDescription("true if this connector definition is available to all workspaces")
    private Boolean _public = false;
    /**
     * whether this is a custom connector definition
     *
     */
    @JsonProperty("custom")
    @JsonPropertyDescription("whether this is a custom connector definition")
    private Boolean custom = false;
    /**
     * whether this is an enterprise connector
     *
     */
    @JsonProperty("enterprise")
    @JsonPropertyDescription("whether this is an enterprise connector")
    private Boolean enterprise = false;
    /**
     * ScopedResourceRequirements
     * <p>
     * actor or actor definition specific resource requirements
     *
     */
    @JsonProperty("resourceRequirements")
    @JsonPropertyDescription("actor or actor definition specific resource requirements")
    private ScopedResourceRequirements resourceRequirements;
    /**
     * Number of seconds allowed between 2 airbyte protocol messages. The source will timeout if this
     * delay is reach
     *
     */
    @JsonProperty("maxSecondsBetweenMessages")
    @JsonPropertyDescription("Number of seconds allowed between 2 airbyte protocol messages. The source will timeout if this delay is reach")
    private Long maxSecondsBetweenMessages;
    /**
     * ConnectorRegistryEntryMetrics
     * <p>
     * Public metrics for a given Connector from the registry (unstable)
     *
     */
    @JsonProperty("metrics")
    @JsonPropertyDescription("Public metrics for a given Connector from the registry (unstable)")
    private ConnectorRegistryEntryMetrics metrics;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = 3462507861572994275L;
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("sourceDefinitionId")
    public UUID getSourceDefinitionId() {
      return sourceDefinitionId;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("sourceDefinitionId")
    public void setSourceDefinitionId(UUID sourceDefinitionId) {
      this.sourceDefinitionId = sourceDefinitionId;
    }
  
    public StandardSourceDefinition withSourceDefinitionId(UUID sourceDefinitionId) {
      this.sourceDefinitionId = sourceDefinitionId;
      return this;
    }
  
    @JsonProperty("defaultVersionId")
    public UUID getDefaultVersionId() {
      return defaultVersionId;
    }
  
    @JsonProperty("defaultVersionId")
    public void setDefaultVersionId(UUID defaultVersionId) {
      this.defaultVersionId = defaultVersionId;
    }
  
    public StandardSourceDefinition withDefaultVersionId(UUID defaultVersionId) {
      this.defaultVersionId = defaultVersionId;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("name")
    public String getName() {
      return name;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("name")
    public void setName(String name) {
      this.name = name;
    }
  
    public StandardSourceDefinition withName(String name) {
      this.name = name;
      return this;
    }
  
    @JsonProperty("icon")
    public String getIcon() {
      return icon;
    }
  
    @JsonProperty("icon")
    public void setIcon(String icon) {
      this.icon = icon;
    }
  
    public StandardSourceDefinition withIcon(String icon) {
      this.icon = icon;
      return this;
    }
  
    @JsonProperty("iconUrl")
    public String getIconUrl() {
      return iconUrl;
    }
  
    @JsonProperty("iconUrl")
    public void setIconUrl(String iconUrl) {
      this.iconUrl = iconUrl;
    }
  
    public StandardSourceDefinition withIconUrl(String iconUrl) {
      this.iconUrl = iconUrl;
      return this;
    }
  
    @JsonProperty("sourceType")
    public SourceType getSourceType() {
      return sourceType;
    }
  
    @JsonProperty("sourceType")
    public void setSourceType(SourceType sourceType) {
      this.sourceType = sourceType;
    }
  
    public StandardSourceDefinition withSourceType(SourceType sourceType) {
      this.sourceType = sourceType;
      return this;
    }
  
    /**
     * if false, the configuration is active. if true, then this configuration is permanently off.
     *
     */
    @JsonProperty("tombstone")
    public Boolean getTombstone() {
      return tombstone;
    }
  
    /**
     * if false, the configuration is active. if true, then this configuration is permanently off.
     *
     */
    @JsonProperty("tombstone")
    public void setTombstone(Boolean tombstone) {
      this.tombstone = tombstone;
    }
  
    public StandardSourceDefinition withTombstone(Boolean tombstone) {
      this.tombstone = tombstone;
      return this;
    }
  
    /**
     * true if this connector definition is available to all workspaces
     *
     */
    @JsonProperty("public")
    public Boolean getPublic() {
      return _public;
    }
  
    /**
     * true if this connector definition is available to all workspaces
     *
     */
    @JsonProperty("public")
    public void setPublic(Boolean _public) {
      this._public = _public;
    }
  
    public StandardSourceDefinition withPublic(Boolean _public) {
      this._public = _public;
      return this;
    }
  
    /**
     * whether this is a custom connector definition
     *
     */
    @JsonProperty("custom")
    public Boolean getCustom() {
      return custom;
    }
  
    /**
     * whether this is a custom connector definition
     *
     */
    @JsonProperty("custom")
    public void setCustom(Boolean custom) {
      this.custom = custom;
    }
  
    public StandardSourceDefinition withCustom(Boolean custom) {
      this.custom = custom;
      return this;
    }
  
    /**
     * whether this is an enterprise connector
     *
     */
    @JsonProperty("enterprise")
    public Boolean getEnterprise() {
      return enterprise;
    }
  
    /**
     * whether this is an enterprise connector
     *
     */
    @JsonProperty("enterprise")
    public void setEnterprise(Boolean enterprise) {
      this.enterprise = enterprise;
    }
  
    public StandardSourceDefinition withEnterprise(Boolean enterprise) {
      this.enterprise = enterprise;
      return this;
    }
  
    /**
     * ScopedResourceRequirements
     * <p>
     * actor or actor definition specific resource requirements
     *
     */
    @JsonProperty("resourceRequirements")
    public ScopedResourceRequirements getResourceRequirements() {
      return resourceRequirements;
    }
  
    /**
     * ScopedResourceRequirements
     * <p>
     * actor or actor definition specific resource requirements
     *
     */
    @JsonProperty("resourceRequirements")
    public void setResourceRequirements(ScopedResourceRequirements resourceRequirements) {
      this.resourceRequirements = resourceRequirements;
    }
  
    public StandardSourceDefinition withResourceRequirements(ScopedResourceRequirements resourceRequirements) {
      this.resourceRequirements = resourceRequirements;
      return this;
    }
  
    /**
     * Number of seconds allowed between 2 airbyte protocol messages. The source will timeout if this
     * delay is reach
     *
     */
    @JsonProperty("maxSecondsBetweenMessages")
    public Long getMaxSecondsBetweenMessages() {
      return maxSecondsBetweenMessages;
    }
  
    /**
     * Number of seconds allowed between 2 airbyte protocol messages. The source will timeout if this
     * delay is reach
     *
     */
    @JsonProperty("maxSecondsBetweenMessages")
    public void setMaxSecondsBetweenMessages(Long maxSecondsBetweenMessages) {
      this.maxSecondsBetweenMessages = maxSecondsBetweenMessages;
    }
  
    public StandardSourceDefinition withMaxSecondsBetweenMessages(Long maxSecondsBetweenMessages) {
      this.maxSecondsBetweenMessages = maxSecondsBetweenMessages;
      return this;
    }
  
    /**
     * ConnectorRegistryEntryMetrics
     * <p>
     * Public metrics for a given Connector from the registry (unstable)
     *
     */
    @JsonProperty("metrics")
    public ConnectorRegistryEntryMetrics getMetrics() {
      return metrics;
    }
  
    /**
     * ConnectorRegistryEntryMetrics
     * <p>
     * Public metrics for a given Connector from the registry (unstable)
     *
     */
    @JsonProperty("metrics")
    public void setMetrics(ConnectorRegistryEntryMetrics metrics) {
      this.metrics = metrics;
    }
  
    public StandardSourceDefinition withMetrics(ConnectorRegistryEntryMetrics metrics) {
      this.metrics = metrics;
      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 StandardSourceDefinition withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(StandardSourceDefinition.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("sourceDefinitionId");
      sb.append('=');
      sb.append(((this.sourceDefinitionId == null) ? "<null>" : this.sourceDefinitionId));
      sb.append(',');
      sb.append("defaultVersionId");
      sb.append('=');
      sb.append(((this.defaultVersionId == null) ? "<null>" : this.defaultVersionId));
      sb.append(',');
      sb.append("name");
      sb.append('=');
      sb.append(((this.name == null) ? "<null>" : this.name));
      sb.append(',');
      sb.append("icon");
      sb.append('=');
      sb.append(((this.icon == null) ? "<null>" : this.icon));
      sb.append(',');
      sb.append("iconUrl");
      sb.append('=');
      sb.append(((this.iconUrl == null) ? "<null>" : this.iconUrl));
      sb.append(',');
      sb.append("sourceType");
      sb.append('=');
      sb.append(((this.sourceType == null) ? "<null>" : this.sourceType));
      sb.append(',');
      sb.append("tombstone");
      sb.append('=');
      sb.append(((this.tombstone == null) ? "<null>" : this.tombstone));
      sb.append(',');
      sb.append("_public");
      sb.append('=');
      sb.append(((this._public == null) ? "<null>" : this._public));
      sb.append(',');
      sb.append("custom");
      sb.append('=');
      sb.append(((this.custom == null) ? "<null>" : this.custom));
      sb.append(',');
      sb.append("enterprise");
      sb.append('=');
      sb.append(((this.enterprise == null) ? "<null>" : this.enterprise));
      sb.append(',');
      sb.append("resourceRequirements");
      sb.append('=');
      sb.append(((this.resourceRequirements == null) ? "<null>" : this.resourceRequirements));
      sb.append(',');
      sb.append("maxSecondsBetweenMessages");
      sb.append('=');
      sb.append(((this.maxSecondsBetweenMessages == null) ? "<null>" : this.maxSecondsBetweenMessages));
      sb.append(',');
      sb.append("metrics");
      sb.append('=');
      sb.append(((this.metrics == null) ? "<null>" : this.metrics));
      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.defaultVersionId == null) ? 0 : this.defaultVersionId.hashCode()));
      result = ((result * 31) + ((this.tombstone == null) ? 0 : this.tombstone.hashCode()));
      result = ((result * 31) + ((this._public == null) ? 0 : this._public.hashCode()));
      result = ((result * 31) + ((this.enterprise == null) ? 0 : this.enterprise.hashCode()));
      result = ((result * 31) + ((this.custom == null) ? 0 : this.custom.hashCode()));
      result = ((result * 31) + ((this.icon == null) ? 0 : this.icon.hashCode()));
      result = ((result * 31) + ((this.sourceDefinitionId == null) ? 0 : this.sourceDefinitionId.hashCode()));
      result = ((result * 31) + ((this.maxSecondsBetweenMessages == null) ? 0 : this.maxSecondsBetweenMessages.hashCode()));
      result = ((result * 31) + ((this.resourceRequirements == null) ? 0 : this.resourceRequirements.hashCode()));
      result = ((result * 31) + ((this.sourceType == null) ? 0 : this.sourceType.hashCode()));
      result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode()));
      result = ((result * 31) + ((this.iconUrl == null) ? 0 : this.iconUrl.hashCode()));
      result = ((result * 31) + ((this.metrics == null) ? 0 : this.metrics.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 StandardSourceDefinition) == false) {
        return false;
      }
      StandardSourceDefinition rhs = ((StandardSourceDefinition) other);
      return (((((((((((((((this.defaultVersionId == rhs.defaultVersionId)
          || ((this.defaultVersionId != null) && this.defaultVersionId.equals(rhs.defaultVersionId)))
          && ((this.tombstone == rhs.tombstone) || ((this.tombstone != null) && this.tombstone.equals(rhs.tombstone))))
          && ((this._public == rhs._public) || ((this._public != null) && this._public.equals(rhs._public))))
          && ((this.enterprise == rhs.enterprise) || ((this.enterprise != null) && this.enterprise.equals(rhs.enterprise))))
          && ((this.custom == rhs.custom) || ((this.custom != null) && this.custom.equals(rhs.custom))))
          && ((this.icon == rhs.icon) || ((this.icon != null) && this.icon.equals(rhs.icon))))
          && ((this.sourceDefinitionId == rhs.sourceDefinitionId)
              || ((this.sourceDefinitionId != null) && this.sourceDefinitionId.equals(rhs.sourceDefinitionId))))
          && ((this.maxSecondsBetweenMessages == rhs.maxSecondsBetweenMessages)
              || ((this.maxSecondsBetweenMessages != null) && this.maxSecondsBetweenMessages.equals(rhs.maxSecondsBetweenMessages))))
          && ((this.resourceRequirements == rhs.resourceRequirements)
              || ((this.resourceRequirements != null) && this.resourceRequirements.equals(rhs.resourceRequirements))))
          && ((this.sourceType == rhs.sourceType) || ((this.sourceType != null) && this.sourceType.equals(rhs.sourceType))))
          && ((this.name == rhs.name) || ((this.name != null) && this.name.equals(rhs.name))))
          && ((this.iconUrl == rhs.iconUrl) || ((this.iconUrl != null) && this.iconUrl.equals(rhs.iconUrl))))
          && ((this.metrics == rhs.metrics) || ((this.metrics != null) && this.metrics.equals(rhs.metrics))))
          && ((this.additionalProperties == rhs.additionalProperties)
              || ((this.additionalProperties != null) && this.additionalProperties.equals(rhs.additionalProperties))));
    }
  
    public enum SourceType {
  
      API("api"),
      FILE("file"),
      DATABASE("database"),
      CUSTOM("custom");
  
      private final String value;
      private final static Map<String, SourceType> CONSTANTS = new HashMap<String, SourceType>();
  
      static {
        for (SourceType c : values()) {
          CONSTANTS.put(c.value, c);
        }
      }
  
      private SourceType(String value) {
        this.value = value;
      }
  
      @Override
      public String toString() {
        return this.value;
      }
  
      @JsonValue
      public String value() {
        return this.value;
      }
  
      @JsonCreator
      public static SourceType fromValue(String value) {
        SourceType constant = CONSTANTS.get(value);
        if (constant == null) {
          throw new IllegalArgumentException(value);
        } else {
          return constant;
        }
      }
  
    }
  
  }
  