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

org.opendatadiscovery.client.model.DataRelationship 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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.opendatadiscovery.client.model.DataRelationshipDetails;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * DataRelationship
 */
@JsonPropertyOrder({
  DataRelationship.JSON_PROPERTY_RELATIONSHIP_TYPE,
  DataRelationship.JSON_PROPERTY_SOURCE_DATASET_ODDRN,
  DataRelationship.JSON_PROPERTY_TARGET_DATASET_ODDRN,
  DataRelationship.JSON_PROPERTY_DETAILS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-04-17T12:42:16.563637609Z[Etc/UTC]")
public class DataRelationship {
  /**
   * Gets or Sets relationshipType
   */
  public enum RelationshipTypeEnum {
    ERD("ERD"),
    
    GRAPH("GRAPH");

    private String value;

    RelationshipTypeEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static RelationshipTypeEnum fromValue(String value) {
      for (RelationshipTypeEnum b : RelationshipTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_RELATIONSHIP_TYPE = "relationship_type";
  private RelationshipTypeEnum relationshipType;

  public static final String JSON_PROPERTY_SOURCE_DATASET_ODDRN = "source_dataset_oddrn";
  private String sourceDatasetOddrn;

  public static final String JSON_PROPERTY_TARGET_DATASET_ODDRN = "target_dataset_oddrn";
  private String targetDatasetOddrn;

  public static final String JSON_PROPERTY_DETAILS = "details";
  private DataRelationshipDetails details;

  public DataRelationship() {
  }

  public DataRelationship relationshipType(RelationshipTypeEnum relationshipType) {
    
    this.relationshipType = relationshipType;
    return this;
  }

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

  public RelationshipTypeEnum getRelationshipType() {
    return relationshipType;
  }


  @JsonProperty(JSON_PROPERTY_RELATIONSHIP_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setRelationshipType(RelationshipTypeEnum relationshipType) {
    this.relationshipType = relationshipType;
  }


  public DataRelationship sourceDatasetOddrn(String sourceDatasetOddrn) {
    
    this.sourceDatasetOddrn = sourceDatasetOddrn;
    return this;
  }

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

  public String getSourceDatasetOddrn() {
    return sourceDatasetOddrn;
  }


  @JsonProperty(JSON_PROPERTY_SOURCE_DATASET_ODDRN)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setSourceDatasetOddrn(String sourceDatasetOddrn) {
    this.sourceDatasetOddrn = sourceDatasetOddrn;
  }


  public DataRelationship targetDatasetOddrn(String targetDatasetOddrn) {
    
    this.targetDatasetOddrn = targetDatasetOddrn;
    return this;
  }

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

  public String getTargetDatasetOddrn() {
    return targetDatasetOddrn;
  }


  @JsonProperty(JSON_PROPERTY_TARGET_DATASET_ODDRN)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setTargetDatasetOddrn(String targetDatasetOddrn) {
    this.targetDatasetOddrn = targetDatasetOddrn;
  }


  public DataRelationship details(DataRelationshipDetails details) {
    
    this.details = details;
    return this;
  }

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

  public DataRelationshipDetails getDetails() {
    return details;
  }


  @JsonProperty(JSON_PROPERTY_DETAILS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDetails(DataRelationshipDetails details) {
    this.details = details;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DataRelationship dataRelationship = (DataRelationship) o;
    return Objects.equals(this.relationshipType, dataRelationship.relationshipType) &&
        Objects.equals(this.sourceDatasetOddrn, dataRelationship.sourceDatasetOddrn) &&
        Objects.equals(this.targetDatasetOddrn, dataRelationship.targetDatasetOddrn) &&
        Objects.equals(this.details, dataRelationship.details);
  }

  @Override
  public int hashCode() {
    return Objects.hash(relationshipType, sourceDatasetOddrn, targetDatasetOddrn, details);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DataRelationship {\n");
    sb.append("    relationshipType: ").append(toIndentedString(relationshipType)).append("\n");
    sb.append("    sourceDatasetOddrn: ").append(toIndentedString(sourceDatasetOddrn)).append("\n");
    sb.append("    targetDatasetOddrn: ").append(toIndentedString(targetDatasetOddrn)).append("\n");
    sb.append("    details: ").append(toIndentedString(details)).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