/*
 * Purview Catalog Service REST API Document
 * Purview Catalog Service is a fully managed cloud service whose users can discover the data sources they need and understand the data sources they find. At the same time, Data Catalog helps organizations get more value from their existing investments. This swagger defines REST API of the Hot Tier of Data Catalog Gen 2.
 *
 * The version of the OpenAPI document: 2020-12-01-preview
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.JsonAtlasGlossaryHeader;
import org.openapitools.client.model.JsonAtlasRelatedCategoryHeader;
import org.openapitools.client.model.JsonAtlasRelatedTermHeader;

/**
 * JsonAtlasGlossaryCategoryAllOf
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-01-21T11:36:33.263002+01:00[Europe/Amsterdam]")
public class JsonAtlasGlossaryCategoryAllOf {
  public static final String SERIALIZED_NAME_ANCHOR = "anchor";
  @SerializedName(SERIALIZED_NAME_ANCHOR)
  private JsonAtlasGlossaryHeader anchor;

  public static final String SERIALIZED_NAME_CHILDREN_CATEGORIES = "childrenCategories";
  @SerializedName(SERIALIZED_NAME_CHILDREN_CATEGORIES)
  private List<JsonAtlasRelatedCategoryHeader> childrenCategories = null;

  public static final String SERIALIZED_NAME_PARENT_CATEGORY = "parentCategory";
  @SerializedName(SERIALIZED_NAME_PARENT_CATEGORY)
  private JsonAtlasRelatedCategoryHeader parentCategory;

  public static final String SERIALIZED_NAME_TERMS = "terms";
  @SerializedName(SERIALIZED_NAME_TERMS)
  private List<JsonAtlasRelatedTermHeader> terms = null;


  public JsonAtlasGlossaryCategoryAllOf anchor(JsonAtlasGlossaryHeader anchor) {
    
    this.anchor = anchor;
    return this;
  }

   /**
   * Get anchor
   * @return anchor
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public JsonAtlasGlossaryHeader getAnchor() {
    return anchor;
  }


  public void setAnchor(JsonAtlasGlossaryHeader anchor) {
    this.anchor = anchor;
  }


  public JsonAtlasGlossaryCategoryAllOf childrenCategories(List<JsonAtlasRelatedCategoryHeader> childrenCategories) {
    
    this.childrenCategories = childrenCategories;
    return this;
  }

  public JsonAtlasGlossaryCategoryAllOf addChildrenCategoriesItem(JsonAtlasRelatedCategoryHeader childrenCategoriesItem) {
    if (this.childrenCategories == null) {
      this.childrenCategories = new ArrayList<JsonAtlasRelatedCategoryHeader>();
    }
    this.childrenCategories.add(childrenCategoriesItem);
    return this;
  }

   /**
   * An array of children categories.
   * @return childrenCategories
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "An array of children categories.")

  public List<JsonAtlasRelatedCategoryHeader> getChildrenCategories() {
    return childrenCategories;
  }


  public void setChildrenCategories(List<JsonAtlasRelatedCategoryHeader> childrenCategories) {
    this.childrenCategories = childrenCategories;
  }


  public JsonAtlasGlossaryCategoryAllOf parentCategory(JsonAtlasRelatedCategoryHeader parentCategory) {
    
    this.parentCategory = parentCategory;
    return this;
  }

   /**
   * Get parentCategory
   * @return parentCategory
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public JsonAtlasRelatedCategoryHeader getParentCategory() {
    return parentCategory;
  }


  public void setParentCategory(JsonAtlasRelatedCategoryHeader parentCategory) {
    this.parentCategory = parentCategory;
  }


  public JsonAtlasGlossaryCategoryAllOf terms(List<JsonAtlasRelatedTermHeader> terms) {
    
    this.terms = terms;
    return this;
  }

  public JsonAtlasGlossaryCategoryAllOf addTermsItem(JsonAtlasRelatedTermHeader termsItem) {
    if (this.terms == null) {
      this.terms = new ArrayList<JsonAtlasRelatedTermHeader>();
    }
    this.terms.add(termsItem);
    return this;
  }

   /**
   * An array of related term headers.
   * @return terms
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "An array of related term headers.")

  public List<JsonAtlasRelatedTermHeader> getTerms() {
    return terms;
  }


  public void setTerms(List<JsonAtlasRelatedTermHeader> terms) {
    this.terms = terms;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    JsonAtlasGlossaryCategoryAllOf jsonAtlasGlossaryCategoryAllOf = (JsonAtlasGlossaryCategoryAllOf) o;
    return Objects.equals(this.anchor, jsonAtlasGlossaryCategoryAllOf.anchor) &&
        Objects.equals(this.childrenCategories, jsonAtlasGlossaryCategoryAllOf.childrenCategories) &&
        Objects.equals(this.parentCategory, jsonAtlasGlossaryCategoryAllOf.parentCategory) &&
        Objects.equals(this.terms, jsonAtlasGlossaryCategoryAllOf.terms);
  }

  @Override
  public int hashCode() {
    return Objects.hash(anchor, childrenCategories, parentCategory, terms);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class JsonAtlasGlossaryCategoryAllOf {\n");
    sb.append("    anchor: ").append(toIndentedString(anchor)).append("\n");
    sb.append("    childrenCategories: ").append(toIndentedString(childrenCategories)).append("\n");
    sb.append("    parentCategory: ").append(toIndentedString(parentCategory)).append("\n");
    sb.append("    terms: ").append(toIndentedString(terms)).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    ");
  }

}

