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

org.opendatadiscovery.client.model.DataRelationshipDetails Maven / Gradle / Ivy

Go to download

Ingestion Contract WebFlux Client defines OpenDataDiscovery APIs and models for Spring WebClient

There is a newer version: 0.1.41
Show newest version
/*
 * OpenDataDiscovery API Contract
 * OpenDataDiscovery API Contract
 *
 * The version of the OpenAPI document: 0.0.1
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.opendatadiscovery.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.opendatadiscovery.client.model.CardinalityType;
import org.opendatadiscovery.client.model.ERDRelationship;
import org.opendatadiscovery.client.model.GraphRelationship;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * DataRelationshipDetails
 */
@JsonPropertyOrder({
  DataRelationshipDetails.JSON_PROPERTY_SOURCE_DATASET_FIELD_ODDRNS_LIST,
  DataRelationshipDetails.JSON_PROPERTY_TARGET_DATASET_FIELD_ODDRNS_LIST,
  DataRelationshipDetails.JSON_PROPERTY_IS_IDENTIFYING,
  DataRelationshipDetails.JSON_PROPERTY_CARDINALITY,
  DataRelationshipDetails.JSON_PROPERTY_RELATIONSHIP_ENTITY_NAME,
  DataRelationshipDetails.JSON_PROPERTY_IS_DIRECTED,
  DataRelationshipDetails.JSON_PROPERTY_ATTRIBUTES
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-17T12:42:16.563637609Z[Etc/UTC]")
@JsonIgnoreProperties(
  value = "relationship_entity_name", // ignore manually set relationship_entity_name, it will be automatically generated by Jackson during serialization
  allowSetters = true // allows the relationship_entity_name to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "relationship_entity_name", visible = true)
@JsonSubTypes({
  @JsonSubTypes.Type(value = ERDRelationship.class, name = "ERDRelationship"),
  @JsonSubTypes.Type(value = GraphRelationship.class, name = "GraphRelationship"),
})

public class DataRelationshipDetails {
  public static final String JSON_PROPERTY_SOURCE_DATASET_FIELD_ODDRNS_LIST = "source_dataset_field_oddrns_list";
  private List sourceDatasetFieldOddrnsList = new ArrayList<>();

  public static final String JSON_PROPERTY_TARGET_DATASET_FIELD_ODDRNS_LIST = "target_dataset_field_oddrns_list";
  private List targetDatasetFieldOddrnsList = new ArrayList<>();

  public static final String JSON_PROPERTY_IS_IDENTIFYING = "is_identifying";
  private Boolean isIdentifying;

  public static final String JSON_PROPERTY_CARDINALITY = "cardinality";
  private CardinalityType cardinality;

  public static final String JSON_PROPERTY_RELATIONSHIP_ENTITY_NAME = "relationship_entity_name";
  protected String relationshipEntityName;

  public static final String JSON_PROPERTY_IS_DIRECTED = "is_directed";
  private Boolean isDirected;

  public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
  private Map attributes = new HashMap<>();

  public DataRelationshipDetails() {
  }

  public DataRelationshipDetails sourceDatasetFieldOddrnsList(List sourceDatasetFieldOddrnsList) {
    
    this.sourceDatasetFieldOddrnsList = sourceDatasetFieldOddrnsList;
    return this;
  }

  public DataRelationshipDetails addSourceDatasetFieldOddrnsListItem(String sourceDatasetFieldOddrnsListItem) {
    if (this.sourceDatasetFieldOddrnsList == null) {
      this.sourceDatasetFieldOddrnsList = new ArrayList<>();
    }
    this.sourceDatasetFieldOddrnsList.add(sourceDatasetFieldOddrnsListItem);
    return this;
  }

   /**
   * Get sourceDatasetFieldOddrnsList
   * @return sourceDatasetFieldOddrnsList
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_SOURCE_DATASET_FIELD_ODDRNS_LIST)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List getSourceDatasetFieldOddrnsList() {
    return sourceDatasetFieldOddrnsList;
  }


  @JsonProperty(JSON_PROPERTY_SOURCE_DATASET_FIELD_ODDRNS_LIST)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setSourceDatasetFieldOddrnsList(List sourceDatasetFieldOddrnsList) {
    this.sourceDatasetFieldOddrnsList = sourceDatasetFieldOddrnsList;
  }


  public DataRelationshipDetails targetDatasetFieldOddrnsList(List targetDatasetFieldOddrnsList) {
    
    this.targetDatasetFieldOddrnsList = targetDatasetFieldOddrnsList;
    return this;
  }

  public DataRelationshipDetails addTargetDatasetFieldOddrnsListItem(String targetDatasetFieldOddrnsListItem) {
    if (this.targetDatasetFieldOddrnsList == null) {
      this.targetDatasetFieldOddrnsList = new ArrayList<>();
    }
    this.targetDatasetFieldOddrnsList.add(targetDatasetFieldOddrnsListItem);
    return this;
  }

   /**
   * Get targetDatasetFieldOddrnsList
   * @return targetDatasetFieldOddrnsList
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_TARGET_DATASET_FIELD_ODDRNS_LIST)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List getTargetDatasetFieldOddrnsList() {
    return targetDatasetFieldOddrnsList;
  }


  @JsonProperty(JSON_PROPERTY_TARGET_DATASET_FIELD_ODDRNS_LIST)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setTargetDatasetFieldOddrnsList(List targetDatasetFieldOddrnsList) {
    this.targetDatasetFieldOddrnsList = targetDatasetFieldOddrnsList;
  }


  public DataRelationshipDetails isIdentifying(Boolean isIdentifying) {
    
    this.isIdentifying = isIdentifying;
    return this;
  }

   /**
   * Get isIdentifying
   * @return isIdentifying
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_IS_IDENTIFYING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getIsIdentifying() {
    return isIdentifying;
  }


  @JsonProperty(JSON_PROPERTY_IS_IDENTIFYING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIsIdentifying(Boolean isIdentifying) {
    this.isIdentifying = isIdentifying;
  }


  public DataRelationshipDetails cardinality(CardinalityType cardinality) {
    
    this.cardinality = cardinality;
    return this;
  }

   /**
   * Get cardinality
   * @return cardinality
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CARDINALITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public CardinalityType getCardinality() {
    return cardinality;
  }


  @JsonProperty(JSON_PROPERTY_CARDINALITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCardinality(CardinalityType cardinality) {
    this.cardinality = cardinality;
  }


  public DataRelationshipDetails relationshipEntityName(String relationshipEntityName) {
    
    this.relationshipEntityName = relationshipEntityName;
    return this;
  }

   /**
   * Get relationshipEntityName
   * @return relationshipEntityName
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_RELATIONSHIP_ENTITY_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getRelationshipEntityName() {
    return relationshipEntityName;
  }


  @JsonProperty(JSON_PROPERTY_RELATIONSHIP_ENTITY_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setRelationshipEntityName(String relationshipEntityName) {
    this.relationshipEntityName = relationshipEntityName;
  }


  public DataRelationshipDetails isDirected(Boolean isDirected) {
    
    this.isDirected = isDirected;
    return this;
  }

   /**
   * Get isDirected
   * @return isDirected
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_IS_DIRECTED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getIsDirected() {
    return isDirected;
  }


  @JsonProperty(JSON_PROPERTY_IS_DIRECTED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIsDirected(Boolean isDirected) {
    this.isDirected = isDirected;
  }


  public DataRelationshipDetails attributes(Map attributes) {
    
    this.attributes = attributes;
    return this;
  }

  public DataRelationshipDetails putAttributesItem(String key, Object attributesItem) {
    if (this.attributes == null) {
      this.attributes = new HashMap<>();
    }
    this.attributes.put(key, attributesItem);
    return this;
  }

   /**
   * Get attributes
   * @return attributes
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
  @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)

  public Map getAttributes() {
    return attributes;
  }


  @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
  @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
  public void setAttributes(Map attributes) {
    this.attributes = attributes;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DataRelationshipDetails dataRelationshipDetails = (DataRelationshipDetails) o;
    return Objects.equals(this.sourceDatasetFieldOddrnsList, dataRelationshipDetails.sourceDatasetFieldOddrnsList) &&
        Objects.equals(this.targetDatasetFieldOddrnsList, dataRelationshipDetails.targetDatasetFieldOddrnsList) &&
        Objects.equals(this.isIdentifying, dataRelationshipDetails.isIdentifying) &&
        Objects.equals(this.cardinality, dataRelationshipDetails.cardinality) &&
        Objects.equals(this.relationshipEntityName, dataRelationshipDetails.relationshipEntityName) &&
        Objects.equals(this.isDirected, dataRelationshipDetails.isDirected) &&
        Objects.equals(this.attributes, dataRelationshipDetails.attributes);
  }

  @Override
  public int hashCode() {
    return Objects.hash(sourceDatasetFieldOddrnsList, targetDatasetFieldOddrnsList, isIdentifying, cardinality, relationshipEntityName, isDirected, attributes);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DataRelationshipDetails {\n");
    sb.append("    sourceDatasetFieldOddrnsList: ").append(toIndentedString(sourceDatasetFieldOddrnsList)).append("\n");
    sb.append("    targetDatasetFieldOddrnsList: ").append(toIndentedString(targetDatasetFieldOddrnsList)).append("\n");
    sb.append("    isIdentifying: ").append(toIndentedString(isIdentifying)).append("\n");
    sb.append("    cardinality: ").append(toIndentedString(cardinality)).append("\n");
    sb.append("    relationshipEntityName: ").append(toIndentedString(relationshipEntityName)).append("\n");
    sb.append("    isDirected: ").append(toIndentedString(isDirected)).append("\n");
    sb.append("    attributes: ").append(toIndentedString(attributes)).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