com.clinia.model.registry.V1RelationshipOperationReceipt 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.time.OffsetDateTime;
import java.util.Objects;
/** V1RelationshipOperationReceipt */
public class V1RelationshipOperationReceipt {
@JsonProperty("receivedAt")
private OffsetDateTime receivedAt;
@JsonProperty("completedAt")
private OffsetDateTime completedAt;
@JsonProperty("status")
private V1OperationStatus status;
@JsonProperty("error")
private V1Error error;
@JsonProperty("id")
private String id;
@JsonProperty("type")
private String type;
/** The time the operation was received. */
@javax.annotation.Nonnull
public OffsetDateTime getReceivedAt() {
return receivedAt;
}
/** The time the operation was completed (whether successfully or not). */
@javax.annotation.Nullable
public OffsetDateTime getCompletedAt() {
return completedAt;
}
public V1RelationshipOperationReceipt setStatus(V1OperationStatus status) {
this.status = status;
return this;
}
/** Get status */
@javax.annotation.Nonnull
public V1OperationStatus getStatus() {
return status;
}
public V1RelationshipOperationReceipt setError(V1Error error) {
this.error = error;
return this;
}
/** Get error */
@javax.annotation.Nullable
public V1Error getError() {
return error;
}
public V1RelationshipOperationReceipt setId(String id) {
this.id = id;
return this;
}
/**
* The unique identifier of the relationship. This is a key with the shape
* `{fromType}.{fromID},{toType}.{toID}`. Key can optionally be passed in the simpler
* `{fromID},{toID}` form.
*/
@javax.annotation.Nonnull
public String getId() {
return id;
}
public V1RelationshipOperationReceipt setType(String type) {
this.type = type;
return this;
}
/** The type of relationship created, upserted, or deleted. */
@javax.annotation.Nonnull
public String getType() {
return type;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1RelationshipOperationReceipt v1RelationshipOperationReceipt = (V1RelationshipOperationReceipt) o;
return (
Objects.equals(this.receivedAt, v1RelationshipOperationReceipt.receivedAt) &&
Objects.equals(this.completedAt, v1RelationshipOperationReceipt.completedAt) &&
Objects.equals(this.status, v1RelationshipOperationReceipt.status) &&
Objects.equals(this.error, v1RelationshipOperationReceipt.error) &&
Objects.equals(this.id, v1RelationshipOperationReceipt.id) &&
Objects.equals(this.type, v1RelationshipOperationReceipt.type)
);
}
@Override
public int hashCode() {
return Objects.hash(receivedAt, completedAt, status, error, id, type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1RelationshipOperationReceipt {\n");
sb.append(" receivedAt: ").append(toIndentedString(receivedAt)).append("\n");
sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" error: ").append(toIndentedString(error)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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 ");
}
}