com.clinia.model.registry.V1RelationshipOperationCreateAllOfCreate 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 create. */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
property = "type",
visible = true,
defaultImpl = V1RelationshipOperationCreateAllOfCreate.class
)
public class V1RelationshipOperationCreateAllOfCreate {
@JsonProperty("type")
private String type;
@JsonProperty("from")
private V1RelationshipRef from;
@JsonProperty("to")
private V1RelationshipRef to;
@JsonProperty("meta")
private V1Meta meta;
@JsonProperty("data")
private T data;
public V1RelationshipOperationCreateAllOfCreate setType(String type) {
this.type = type;
return this;
}
/** Get type */
@javax.annotation.Nonnull
public String getType() {
return type;
}
public V1RelationshipOperationCreateAllOfCreate setFrom(V1RelationshipRef from) {
this.from = from;
return this;
}
/** Get from */
@javax.annotation.Nonnull
public V1RelationshipRef getFrom() {
return from;
}
public V1RelationshipOperationCreateAllOfCreate setTo(V1RelationshipRef to) {
this.to = to;
return this;
}
/** Get to */
@javax.annotation.Nonnull
public V1RelationshipRef getTo() {
return to;
}
public V1RelationshipOperationCreateAllOfCreate setMeta(V1Meta meta) {
this.meta = meta;
return this;
}
/** Get meta */
@javax.annotation.Nullable
public V1Meta getMeta() {
return meta;
}
public V1RelationshipOperationCreateAllOfCreate setData(T data) {
this.data = data;
return this;
}
/** Get data */
@javax.annotation.Nullable
public T getData() {
return data;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1RelationshipOperationCreateAllOfCreate> v1RelationshipOperationCreateAllOfCreate = (V1RelationshipOperationCreateAllOfCreate>) o;
return (
Objects.equals(this.type, v1RelationshipOperationCreateAllOfCreate.type) &&
Objects.equals(this.from, v1RelationshipOperationCreateAllOfCreate.from) &&
Objects.equals(this.to, v1RelationshipOperationCreateAllOfCreate.to) &&
Objects.equals(this.meta, v1RelationshipOperationCreateAllOfCreate.meta) &&
Objects.equals(this.data, v1RelationshipOperationCreateAllOfCreate.data)
);
}
@Override
public int hashCode() {
return Objects.hash(type, from, to, meta, data);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1RelationshipOperationCreateAllOfCreate {\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(" meta: ").append(toIndentedString(meta)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).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 ");
}
}