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

com.clinia.model.common.V1Resource 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.common;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.Objects;

/** V1Resource */
@JsonTypeInfo(
  use = JsonTypeInfo.Id.NAME,
  include = JsonTypeInfo.As.EXISTING_PROPERTY,
  property = "type",
  visible = true,
  defaultImpl = V1Resource.class
)
public class V1Resource {

  @JsonProperty("id")
  private String id;

  @JsonProperty("type")
  private String type;

  @JsonProperty("meta")
  private V1Meta meta;

  @JsonProperty("data")
  private T data;

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

  /** Get id */
  @javax.annotation.Nonnull
  public String getId() {
    return id;
  }

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

  /** Type of the resource. */
  @javax.annotation.Nonnull
  public String getType() {
    return type;
  }

  /** Get meta */
  @javax.annotation.Nonnull
  public V1Meta getMeta() {
    return meta;
  }

  public V1Resource setData(T data) {
    this.data = data;
    return this;
  }

  /** Get data */
  @javax.annotation.Nonnull
  public T getData() {
    return data;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1Resource v1Resource = (V1Resource) o;
    return (
      Objects.equals(this.id, v1Resource.id) &&
      Objects.equals(this.type, v1Resource.type) &&
      Objects.equals(this.meta, v1Resource.meta) &&
      Objects.equals(this.data, v1Resource.data)
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, type, meta, data);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1Resource {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).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    ");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy