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;
  import java.util.UUID;
  
  /**
   * ConnectionContext
   * <p>
   * Context to be passed to a temporal workflow and its activities/child workflows.
   *
   */
  @JsonInclude(JsonInclude.Include.NON_NULL)
  @JsonPropertyOrder({
    "connectionId",
    "sourceId",
    "destinationId",
    "sourceDefinitionId",
    "destinationDefinitionId",
    "workspaceId",
    "organizationId"
  })
  @Generated(value = "Generated by jsonSchema2Pojo")
  public class ConnectionContext implements Serializable {
  
    /**
     * The ID of the relevant connection.
     *
     */
    @JsonProperty("connectionId")
    @JsonPropertyDescription("The ID of the relevant connection.")
    private UUID connectionId;
    /**
     * The ID of the relevant source.
     *
     */
    @JsonProperty("sourceId")
    @JsonPropertyDescription("The ID of the relevant source.")
    private UUID sourceId;
    /**
     * The ID of the relevant destination.
     *
     */
    @JsonProperty("destinationId")
    @JsonPropertyDescription("The ID of the relevant destination.")
    private UUID destinationId;
    /**
     * The ID of the relevant source definition.
     *
     */
    @JsonProperty("sourceDefinitionId")
    @JsonPropertyDescription("The ID of the relevant source definition.")
    private UUID sourceDefinitionId;
    /**
     * The ID of the relevant destination definition.
     *
     */
    @JsonProperty("destinationDefinitionId")
    @JsonPropertyDescription("The ID of the relevant destination definition.")
    private UUID destinationDefinitionId;
    /**
     * The ID of the workspace related to this workflow
     *
     */
    @JsonProperty("workspaceId")
    @JsonPropertyDescription("The ID of the workspace related to this workflow")
    private UUID workspaceId;
    /**
     * The ID of the organization related to this workflow
     *
     */
    @JsonProperty("organizationId")
    @JsonPropertyDescription("The ID of the organization related to this workflow")
    private UUID organizationId;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
    private final static long serialVersionUID = 3329116544045565604L;
  
    /**
     * The ID of the relevant connection.
     *
     */
    @JsonProperty("connectionId")
    public UUID getConnectionId() {
      return connectionId;
    }
  
    /**
     * The ID of the relevant connection.
     *
     */
    @JsonProperty("connectionId")
    public void setConnectionId(UUID connectionId) {
      this.connectionId = connectionId;
    }
  
    public ConnectionContext withConnectionId(UUID connectionId) {
      this.connectionId = connectionId;
      return this;
    }
  
    /**
     * The ID of the relevant source.
     *
     */
    @JsonProperty("sourceId")
    public UUID getSourceId() {
      return sourceId;
    }
  
    /**
     * The ID of the relevant source.
     *
     */
    @JsonProperty("sourceId")
    public void setSourceId(UUID sourceId) {
      this.sourceId = sourceId;
    }
  
    public ConnectionContext withSourceId(UUID sourceId) {
      this.sourceId = sourceId;
      return this;
    }
  
    /**
     * The ID of the relevant destination.
     *
     */
    @JsonProperty("destinationId")
    public UUID getDestinationId() {
      return destinationId;
    }
  
    /**
     * The ID of the relevant destination.
     *
     */
    @JsonProperty("destinationId")
    public void setDestinationId(UUID destinationId) {
      this.destinationId = destinationId;
    }
  
    public ConnectionContext withDestinationId(UUID destinationId) {
      this.destinationId = destinationId;
      return this;
    }
  
    /**
     * The ID of the relevant source definition.
     *
     */
    @JsonProperty("sourceDefinitionId")
    public UUID getSourceDefinitionId() {
      return sourceDefinitionId;
    }
  
    /**
     * The ID of the relevant source definition.
     *
     */
    @JsonProperty("sourceDefinitionId")
    public void setSourceDefinitionId(UUID sourceDefinitionId) {
      this.sourceDefinitionId = sourceDefinitionId;
    }
  
    public ConnectionContext withSourceDefinitionId(UUID sourceDefinitionId) {
      this.sourceDefinitionId = sourceDefinitionId;
      return this;
    }
  
    /**
     * The ID of the relevant destination definition.
     *
     */
    @JsonProperty("destinationDefinitionId")
    public UUID getDestinationDefinitionId() {
      return destinationDefinitionId;
    }
  
    /**
     * The ID of the relevant destination definition.
     *
     */
    @JsonProperty("destinationDefinitionId")
    public void setDestinationDefinitionId(UUID destinationDefinitionId) {
      this.destinationDefinitionId = destinationDefinitionId;
    }
  
    public ConnectionContext withDestinationDefinitionId(UUID destinationDefinitionId) {
      this.destinationDefinitionId = destinationDefinitionId;
      return this;
    }
  
    /**
     * The ID of the workspace related to this workflow
     *
     */
    @JsonProperty("workspaceId")
    public UUID getWorkspaceId() {
      return workspaceId;
    }
  
    /**
     * The ID of the workspace related to this workflow
     *
     */
    @JsonProperty("workspaceId")
    public void setWorkspaceId(UUID workspaceId) {
      this.workspaceId = workspaceId;
    }
  
    public ConnectionContext withWorkspaceId(UUID workspaceId) {
      this.workspaceId = workspaceId;
      return this;
    }
  
    /**
     * The ID of the organization related to this workflow
     *
     */
    @JsonProperty("organizationId")
    public UUID getOrganizationId() {
      return organizationId;
    }
  
    /**
     * The ID of the organization related to this workflow
     *
     */
    @JsonProperty("organizationId")
    public void setOrganizationId(UUID organizationId) {
      this.organizationId = organizationId;
    }
  
    public ConnectionContext withOrganizationId(UUID organizationId) {
      this.organizationId = organizationId;
      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 ConnectionContext withAdditionalProperty(String name, Object value) {
      this.additionalProperties.put(name, value);
      return this;
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(ConnectionContext.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
      sb.append("connectionId");
      sb.append('=');
      sb.append(((this.connectionId == null) ? "<null>" : this.connectionId));
      sb.append(',');
      sb.append("sourceId");
      sb.append('=');
      sb.append(((this.sourceId == null) ? "<null>" : this.sourceId));
      sb.append(',');
      sb.append("destinationId");
      sb.append('=');
      sb.append(((this.destinationId == null) ? "<null>" : this.destinationId));
      sb.append(',');
      sb.append("sourceDefinitionId");
      sb.append('=');
      sb.append(((this.sourceDefinitionId == null) ? "<null>" : this.sourceDefinitionId));
      sb.append(',');
      sb.append("destinationDefinitionId");
      sb.append('=');
      sb.append(((this.destinationDefinitionId == null) ? "<null>" : this.destinationDefinitionId));
      sb.append(',');
      sb.append("workspaceId");
      sb.append('=');
      sb.append(((this.workspaceId == null) ? "<null>" : this.workspaceId));
      sb.append(',');
      sb.append("organizationId");
      sb.append('=');
      sb.append(((this.organizationId == null) ? "<null>" : this.organizationId));
      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.sourceId == null) ? 0 : this.sourceId.hashCode()));
      result = ((result * 31) + ((this.organizationId == null) ? 0 : this.organizationId.hashCode()));
      result = ((result * 31) + ((this.connectionId == null) ? 0 : this.connectionId.hashCode()));
      result = ((result * 31) + ((this.sourceDefinitionId == null) ? 0 : this.sourceDefinitionId.hashCode()));
      result = ((result * 31) + ((this.destinationDefinitionId == null) ? 0 : this.destinationDefinitionId.hashCode()));
      result = ((result * 31) + ((this.additionalProperties == null) ? 0 : this.additionalProperties.hashCode()));
      result = ((result * 31) + ((this.destinationId == null) ? 0 : this.destinationId.hashCode()));
      result = ((result * 31) + ((this.workspaceId == null) ? 0 : this.workspaceId.hashCode()));
      return result;
    }
  
    @Override
    public boolean equals(Object other) {
      if (other == this) {
        return true;
      }
      if ((other instanceof ConnectionContext) == false) {
        return false;
      }
      ConnectionContext rhs = ((ConnectionContext) other);
      return (((((((((this.sourceId == rhs.sourceId) || ((this.sourceId != null) && this.sourceId.equals(rhs.sourceId)))
          && ((this.organizationId == rhs.organizationId) || ((this.organizationId != null) && this.organizationId.equals(rhs.organizationId))))
          && ((this.connectionId == rhs.connectionId) || ((this.connectionId != null) && this.connectionId.equals(rhs.connectionId))))
          && ((this.sourceDefinitionId == rhs.sourceDefinitionId)
              || ((this.sourceDefinitionId != null) && this.sourceDefinitionId.equals(rhs.sourceDefinitionId))))
          && ((this.destinationDefinitionId == rhs.destinationDefinitionId)
              || ((this.destinationDefinitionId != null) && this.destinationDefinitionId.equals(rhs.destinationDefinitionId))))
          && ((this.additionalProperties == rhs.additionalProperties)
              || ((this.additionalProperties != null) && this.additionalProperties.equals(rhs.additionalProperties))))
          && ((this.destinationId == rhs.destinationId) || ((this.destinationId != null) && this.destinationId.equals(rhs.destinationId))))
          && ((this.workspaceId == rhs.workspaceId) || ((this.workspaceId != null) && this.workspaceId.equals(rhs.workspaceId))));
    }
  
  }
  