All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clinia.model.datacatalog.V1DataSourcePartitionConfig Maven / Gradle / Ivy

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/clinia/api-clients-generation. DO NOT EDIT.

package com.clinia.model.datacatalog;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** V1DataSourcePartitionConfig */
@JsonDeserialize(as = V1DataSourcePartitionConfig.class)
public class V1DataSourcePartitionConfig implements V1DataPartitionSourceConfig {

  @JsonProperty("type")
  private String type;

  @JsonProperty("key")
  private String key;

  @JsonProperty("collections")
  private List collections;

  @JsonProperty("relationships")
  private List relationships;

  public V1DataSourcePartitionConfig setType(String type) {
    this.type = type;
    return this;
  }

  /** Get type */
  @javax.annotation.Nonnull
  public String getType() {
    return type;
  }

  public V1DataSourcePartitionConfig setKey(String key) {
    this.key = key;
    return this;
  }

  /** The key of the target data source. */
  @javax.annotation.Nonnull
  public String getKey() {
    return key;
  }

  public V1DataSourcePartitionConfig setCollections(List collections) {
    this.collections = collections;
    return this;
  }

  public V1DataSourcePartitionConfig addCollections(V1DataSourcePartitionCollectionConnection collectionsItem) {
    if (this.collections == null) {
      this.collections = new ArrayList<>();
    }
    this.collections.add(collectionsItem);
    return this;
  }

  /**
   * The subset of collections from the target data source to which the data partition is connected,
   * if not specified, the data partition is connected to all collections in the data source.
   */
  @javax.annotation.Nullable
  public List getCollections() {
    return collections;
  }

  public V1DataSourcePartitionConfig setRelationships(List relationships) {
    this.relationships = relationships;
    return this;
  }

  public V1DataSourcePartitionConfig addRelationships(String relationshipsItem) {
    if (this.relationships == null) {
      this.relationships = new ArrayList<>();
    }
    this.relationships.add(relationshipsItem);
    return this;
  }

  /**
   * The subset of relationship definitions from the target data source used in the data partition,
   * If the relationships are not specified, the data partition uses all the relationships of the
   * data source that are between two collections in the data partition.
   */
  @javax.annotation.Nullable
  public List getRelationships() {
    return relationships;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1DataSourcePartitionConfig v1DataSourcePartitionConfig = (V1DataSourcePartitionConfig) o;
    return (
      Objects.equals(this.type, v1DataSourcePartitionConfig.type) &&
      Objects.equals(this.key, v1DataSourcePartitionConfig.key) &&
      Objects.equals(this.collections, v1DataSourcePartitionConfig.collections) &&
      Objects.equals(this.relationships, v1DataSourcePartitionConfig.relationships)
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(type, key, collections, relationships);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1DataSourcePartitionConfig {\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    key: ").append(toIndentedString(key)).append("\n");
    sb.append("    collections: ").append(toIndentedString(collections)).append("\n");
    sb.append("    relationships: ").append(toIndentedString(relationships)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy