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 com.fasterxml.jackson.databind.JsonNode;
  import jakarta.annotation.Generated;
  import java.io.Serializable;
  import java.util.HashMap;
  import java.util.Map;
  import java.util.Objects;
  import java.util.UUID;
  
  /**
   * SourceConnection
   * <p>
   * information required for connection to a destination.
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "name",
    "sourceDefinitionId",
    "workspaceId",
    "sourceId",
    "configuration",
    "tombstone",
    "createdAt",
    "updatedAt",
    "resourceRequirements"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class SourceConnection implements Serializable {
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("name")
    private String name;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("sourceDefinitionId")
    private UUID sourceDefinitionId;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("workspaceId")
    private UUID workspaceId;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("sourceId")
    private UUID sourceId;
    /**
     * Integration specific blob. Must be a valid JSON string. (Required)
     *
     */
    @JsonProperty("configuration")
    @JsonPropertyDescription("Integration specific blob. Must be a valid JSON string.")
    private JsonNode configuration;
    /**
     * if not set or false, the configuration is active. if true, then this configuration is permanently
     * off. (Required)
     *
     */
    @JsonProperty("tombstone")
    @JsonPropertyDescription("if not set or false, the configuration is active. if true, then this configuration is permanently off.")
    private Boolean tombstone;
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("createdAt")
    private Long createdAt;
    @JsonProperty("updatedAt")
    private Long updatedAt;
    /**
     * ScopedResourceRequirements
     * <p>
     * actor or actor definition specific resource requirements
     *
     */
    @JsonProperty("resourceRequirements")
    @JsonPropertyDescription("actor or actor definition specific resource requirements")
    private ScopedResourceRequirements resourceRequirements;
    @JsonIgnore
    private final Map<String, Object> additionalProperties = new HashMap<>();
    private final static long serialVersionUID = -7889954900392172234L;
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("name")
    public String getName() {
      return name;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("name")
    public void setName(String name) {
      this.name = name;
    }
  
    public SourceConnection withName(String name) {
      this.name = name;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("sourceDefinitionId")
    public UUID getSourceDefinitionId() {
      return sourceDefinitionId;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("sourceDefinitionId")
    public void setSourceDefinitionId(UUID sourceDefinitionId) {
      this.sourceDefinitionId = sourceDefinitionId;
    }
  
    public SourceConnection withSourceDefinitionId(UUID sourceDefinitionId) {
      this.sourceDefinitionId = sourceDefinitionId;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("workspaceId")
    public UUID getWorkspaceId() {
      return workspaceId;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("workspaceId")
    public void setWorkspaceId(UUID workspaceId) {
      this.workspaceId = workspaceId;
    }
  
    public SourceConnection withWorkspaceId(UUID workspaceId) {
      this.workspaceId = workspaceId;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("sourceId")
    public UUID getSourceId() {
      return sourceId;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("sourceId")
    public void setSourceId(UUID sourceId) {
      this.sourceId = sourceId;
    }
  
    public SourceConnection withSourceId(UUID sourceId) {
      this.sourceId = sourceId;
      return this;
    }
  
    /**
     * Integration specific blob. Must be a valid JSON string. (Required)
     *
     */
    @JsonProperty("configuration")
    public JsonNode getConfiguration() {
      return configuration;
    }
  
    /**
     * Integration specific blob. Must be a valid JSON string. (Required)
     *
     */
    @JsonProperty("configuration")
    public void setConfiguration(JsonNode configuration) {
      this.configuration = configuration;
    }
  
    public SourceConnection withConfiguration(JsonNode configuration) {
      this.configuration = configuration;
      return this;
    }
  
    /**
     * if not set or false, the configuration is active. if true, then this configuration is permanently
     * off. (Required)
     *
     */
    @JsonProperty("tombstone")
    public Boolean getTombstone() {
      return tombstone;
    }
  
    /**
     * if not set or false, the configuration is active. if true, then this configuration is permanently
     * off. (Required)
     *
     */
    @JsonProperty("tombstone")
    public void setTombstone(Boolean tombstone) {
      this.tombstone = tombstone;
    }
  
    public SourceConnection withTombstone(Boolean tombstone) {
      this.tombstone = tombstone;
      return this;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("createdAt")
    public Long getCreatedAt() {
      return createdAt;
    }
  
    /**
     *
     * (Required)
     *
     */
    @JsonProperty("createdAt")
    public void setCreatedAt(Long createdAt) {
      this.createdAt = createdAt;
    }
  
    public SourceConnection withCreatedAt(Long createdAt) {
      this.createdAt = createdAt;
      return this;
    }
  
    @JsonProperty("updatedAt")
    public Long getUpdatedAt() {
      return updatedAt;
    }
  
    @JsonProperty("updatedAt")
    public void setUpdatedAt(Long updatedAt) {
      this.updatedAt = updatedAt;
    }
  
    public SourceConnection withUpdatedAt(Long updatedAt) {
      this.updatedAt = updatedAt;
      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 SourceConnection withResourceRequirements(ScopedResourceRequirements resourceRequirements) {
      this.resourceRequirements = resourceRequirements;
      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 SourceConnection withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(SourceConnection.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("name");
      sb.append('=');
      sb.append(((this.name == null) ? "<null>" : this.name));
      sb.append(',');
      sb.append("sourceDefinitionId");
      sb.append('=');
      sb.append(((this.sourceDefinitionId == null) ? "<null>" : this.sourceDefinitionId));
      sb.append(',');
      sb.append("workspaceId");
      sb.append('=');
      sb.append(((this.workspaceId == null) ? "<null>" : this.workspaceId));
      sb.append(',');
      sb.append("sourceId");
      sb.append('=');
      sb.append(((this.sourceId == null) ? "<null>" : this.sourceId));
      sb.append(',');
      sb.append("configuration");
      sb.append('=');
      sb.append(((this.configuration == null) ? "<null>" : this.configuration));
      sb.append(',');
      sb.append("tombstone");
      sb.append('=');
      sb.append(((this.tombstone == null) ? "<null>" : this.tombstone));
      sb.append(',');
      sb.append("createdAt");
      sb.append('=');
      sb.append(((this.createdAt == null) ? "<null>" : this.createdAt));
      sb.append(',');
      sb.append("updatedAt");
      sb.append('=');
      sb.append(((this.updatedAt == null) ? "<null>" : this.updatedAt));
      sb.append(',');
      sb.append("resourceRequirements");
      sb.append('=');
      sb.append(((this.resourceRequirements == null) ? "<null>" : this.resourceRequirements));
      sb.append(',');
      sb.append("additionalProperties");
      sb.append('=');
      sb.append(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.sourceId == null) ? 0 : this.sourceId.hashCode()));
      result = ((result * 31) + ((this.resourceRequirements == null) ? 0 : this.resourceRequirements.hashCode()));
      result = ((result * 31) + ((this.createdAt == null) ? 0 : this.createdAt.hashCode()));
      result = ((result * 31) + ((this.tombstone == null) ? 0 : this.tombstone.hashCode()));
      result = ((result * 31) + ((this.configuration == null) ? 0 : this.configuration.hashCode()));
      result = ((result * 31) + ((this.name == null) ? 0 : this.name.hashCode()));
      result = ((result * 31) + ((this.sourceDefinitionId == null) ? 0 : this.sourceDefinitionId.hashCode()));
      result = result * 31 + this.additionalProperties.hashCode();
      result = ((result * 31) + ((this.workspaceId == null) ? 0 : this.workspaceId.hashCode()));
      result = ((result * 31) + ((this.updatedAt == null) ? 0 : this.updatedAt.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if (!(other instanceof SourceConnection rhs)) {
        return false;
      }
      return ((((((((((Objects.equals(this.sourceId, rhs.sourceId))
          && (Objects.equals(this.resourceRequirements, rhs.resourceRequirements)))
          && (Objects.equals(this.createdAt, rhs.createdAt)))
          && (Objects.equals(this.tombstone, rhs.tombstone)))
          && (Objects.equals(this.configuration, rhs.configuration)))
          && (Objects.equals(this.name, rhs.name)))
          && (Objects.equals(this.sourceDefinitionId, rhs.sourceDefinitionId)))
          && (Objects.equals(this.additionalProperties, rhs.additionalProperties)))
          && (Objects.equals(this.workspaceId, rhs.workspaceId)))
          && (Objects.equals(this.updatedAt, rhs.updatedAt)));
    }
  
  }
  