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

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

/** V1OperationReceipt */
public class V1OperationReceipt {

  @JsonProperty("receivedAt")
  private OffsetDateTime receivedAt;

  @JsonProperty("completedAt")
  private OffsetDateTime completedAt;

  @JsonProperty("status")
  private V1OperationStatus status;

  @JsonProperty("error")
  private V1Error error;

  /** 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 V1OperationReceipt setStatus(V1OperationStatus status) {
    this.status = status;
    return this;
  }

  /** Get status */
  @javax.annotation.Nonnull
  public V1OperationStatus getStatus() {
    return status;
  }

  public V1OperationReceipt setError(V1Error error) {
    this.error = error;
    return this;
  }

  /** Get error */
  @javax.annotation.Nullable
  public V1Error getError() {
    return error;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1OperationReceipt v1OperationReceipt = (V1OperationReceipt) o;
    return (
      Objects.equals(this.receivedAt, v1OperationReceipt.receivedAt) &&
      Objects.equals(this.completedAt, v1OperationReceipt.completedAt) &&
      Objects.equals(this.status, v1OperationReceipt.status) &&
      Objects.equals(this.error, v1OperationReceipt.error)
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(receivedAt, completedAt, status, error);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1OperationReceipt {\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("}");
    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