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

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

/** V1ResourceOperationReceipt */
public class V1ResourceOperationReceipt {

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

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

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

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

  public V1ResourceOperationReceipt setId(String id) {
    this.id = id;
    return this;
  }

  /** The ID of the resource created, upserted, or deleted. */
  @javax.annotation.Nonnull
  public String getId() {
    return id;
  }

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

  /** The type of resource 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;
    }
    V1ResourceOperationReceipt v1ResourceOperationReceipt = (V1ResourceOperationReceipt) o;
    return (
      Objects.equals(this.receivedAt, v1ResourceOperationReceipt.receivedAt) &&
      Objects.equals(this.completedAt, v1ResourceOperationReceipt.completedAt) &&
      Objects.equals(this.status, v1ResourceOperationReceipt.status) &&
      Objects.equals(this.error, v1ResourceOperationReceipt.error) &&
      Objects.equals(this.id, v1ResourceOperationReceipt.id) &&
      Objects.equals(this.type, v1ResourceOperationReceipt.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 V1ResourceOperationReceipt {\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    ");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy