com.clinia.model.registry.V1RelationshipOperationUpsert 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.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.Objects;
/** V1RelationshipOperationUpsert */
@JsonDeserialize(as = V1RelationshipOperationUpsert.class)
public class V1RelationshipOperationUpsert implements V1RelationshipOperation {
@JsonProperty("action")
private V1OperationAction action = V1OperationAction.UPSERT;
@JsonProperty("upsert")
private V1RelationshipOperationUpsertAllOfUpsert upsert;
public V1RelationshipOperationUpsert setAction(V1OperationAction action) {
this.action = action;
return this;
}
/** Get action */
@javax.annotation.Nonnull
public V1OperationAction getAction() {
return action;
}
public V1RelationshipOperationUpsert setUpsert(V1RelationshipOperationUpsertAllOfUpsert upsert) {
this.upsert = upsert;
return this;
}
/** Get upsert */
@javax.annotation.Nonnull
public V1RelationshipOperationUpsertAllOfUpsert getUpsert() {
return upsert;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1RelationshipOperationUpsert v1RelationshipOperationUpsert = (V1RelationshipOperationUpsert) o;
return (
Objects.equals(this.action, v1RelationshipOperationUpsert.action) && Objects.equals(this.upsert, v1RelationshipOperationUpsert.upsert)
);
}
@Override
public int hashCode() {
return Objects.hash(action, upsert);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1RelationshipOperationUpsert {\n");
sb.append(" action: ").append(toIndentedString(action)).append("\n");
sb.append(" upsert: ").append(toIndentedString(upsert)).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 ");
}
}