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

com.clinia.model.registry.V1RelationshipOperationUpsertAllOfUpsert 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.registry;

import com.clinia.model.common.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.Objects;

/** The relationship to upsert. */
@JsonTypeInfo(
  use = JsonTypeInfo.Id.NAME,
  include = JsonTypeInfo.As.EXISTING_PROPERTY,
  property = "type",
  visible = true,
  defaultImpl = V1RelationshipOperationUpsertAllOfUpsert.class
)
public class V1RelationshipOperationUpsertAllOfUpsert {

  @JsonProperty("type")
  private String type;

  @JsonProperty("from")
  private V1RelationshipRef from;

  @JsonProperty("to")
  private V1RelationshipRef to;

  @JsonProperty("data")
  private T data;

  @JsonProperty("meta")
  private V1Meta meta;

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

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

  public V1RelationshipOperationUpsertAllOfUpsert setFrom(V1RelationshipRef from) {
    this.from = from;
    return this;
  }

  /** Get from */
  @javax.annotation.Nonnull
  public V1RelationshipRef getFrom() {
    return from;
  }

  public V1RelationshipOperationUpsertAllOfUpsert setTo(V1RelationshipRef to) {
    this.to = to;
    return this;
  }

  /** Get to */
  @javax.annotation.Nonnull
  public V1RelationshipRef getTo() {
    return to;
  }

  public V1RelationshipOperationUpsertAllOfUpsert setData(T data) {
    this.data = data;
    return this;
  }

  /** Get data */
  @javax.annotation.Nullable
  public T getData() {
    return data;
  }

  public V1RelationshipOperationUpsertAllOfUpsert setMeta(V1Meta meta) {
    this.meta = meta;
    return this;
  }

  /** Get meta */
  @javax.annotation.Nullable
  public V1Meta getMeta() {
    return meta;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1RelationshipOperationUpsertAllOfUpsert v1RelationshipOperationUpsertAllOfUpsert = (V1RelationshipOperationUpsertAllOfUpsert) o;
    return (
      Objects.equals(this.type, v1RelationshipOperationUpsertAllOfUpsert.type) &&
      Objects.equals(this.from, v1RelationshipOperationUpsertAllOfUpsert.from) &&
      Objects.equals(this.to, v1RelationshipOperationUpsertAllOfUpsert.to) &&
      Objects.equals(this.data, v1RelationshipOperationUpsertAllOfUpsert.data) &&
      Objects.equals(this.meta, v1RelationshipOperationUpsertAllOfUpsert.meta)
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(type, from, to, data, meta);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1RelationshipOperationUpsertAllOfUpsert {\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    from: ").append(toIndentedString(from)).append("\n");
    sb.append("    to: ").append(toIndentedString(to)).append("\n");
    sb.append("    data: ").append(toIndentedString(data)).append("\n");
    sb.append("    meta: ").append(toIndentedString(meta)).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