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

com.clinia.model.common.V1DomainResourceWithIncludes 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.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

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

  @JsonProperty("id")
  private String id;

  @JsonProperty("type")
  private String type;

  @JsonProperty("meta")
  private V1Meta meta;

  @JsonProperty("data")
  private T data;

  @JsonProperty("contained")
  private Map> contained;

  @JsonProperty("includes")
  private Map includes;

  /** Id of the resource. */
  @javax.annotation.Nonnull
  public String getId() {
    return id;
  }

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

  public V1DomainResourceWithIncludes setMeta(V1Meta meta) {
    this.meta = meta;
    return this;
  }

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

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

  /** Dynamic data attributes, based on the resource type. */
  @javax.annotation.Nonnull
  public T getData() {
    return data;
  }

  public V1DomainResourceWithIncludes setContained(Map> contained) {
    this.contained = contained;
    return this;
  }

  public V1DomainResourceWithIncludes putContained(String key, List containedItem) {
    if (this.contained == null) {
      this.contained = new HashMap<>();
    }
    this.contained.put(key, containedItem);
    return this;
  }

  /**
   * Resources contained in this top-level resource. Contained resources exists only within the
   * context of this top-level resource.
   */
  @javax.annotation.Nullable
  public Map> getContained() {
    return contained;
  }

  public V1DomainResourceWithIncludes setIncludes(Map includes) {
    this.includes = includes;
    return this;
  }

  public V1DomainResourceWithIncludes putIncludes(String key, V1DomainResourceWithIncludesAllOfIncludes includesItem) {
    if (this.includes == null) {
      this.includes = new HashMap<>();
    }
    this.includes.put(key, includesItem);
    return this;
  }

  /** Get includes */
  @javax.annotation.Nullable
  public Map getIncludes() {
    return includes;
  }

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

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

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