/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.13.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.cloudera.api.swagger.model;

import java.util.Objects;
import java.util.Arrays;
import com.cloudera.api.swagger.model.ApiClusterRef;
import com.cloudera.api.swagger.model.ApiControlPlaneRef;
import com.cloudera.api.swagger.model.ApiHostRef;
import com.cloudera.api.swagger.model.ApiRoleRef;
import com.cloudera.api.swagger.model.ApiServiceRef;
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.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
 * API object which groups types of entities as per the associated tag
 */
@Schema(description = "API object which groups types of entities as per the associated tag")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiTagToEntities {
  @SerializedName("name")
  private String name = null;

  @SerializedName("value")
  private String value = null;

  @SerializedName("apiClusterRefs")
  private List<ApiClusterRef> apiClusterRefs = null;

  @SerializedName("apiServiceRefs")
  private List<ApiServiceRef> apiServiceRefs = null;

  @SerializedName("apiRoleRefs")
  private List<ApiRoleRef> apiRoleRefs = null;

  @SerializedName("apiHostRefs")
  private List<ApiHostRef> apiHostRefs = null;

  @SerializedName("apiControlPlaneRefs")
  private List<ApiControlPlaneRef> apiControlPlaneRefs = null;

  public ApiTagToEntities name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @Schema(description = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public ApiTagToEntities value(String value) {
    this.value = value;
    return this;
  }

   /**
   * Get value
   * @return value
  **/
  @Schema(description = "")
  public String getValue() {
    return value;
  }

  public void setValue(String value) {
    this.value = value;
  }

  public ApiTagToEntities apiClusterRefs(List<ApiClusterRef> apiClusterRefs) {
    this.apiClusterRefs = apiClusterRefs;
    return this;
  }

  public ApiTagToEntities addApiClusterRefsItem(ApiClusterRef apiClusterRefsItem) {
    if (this.apiClusterRefs == null) {
      this.apiClusterRefs = new ArrayList<>();
    }
    this.apiClusterRefs.add(apiClusterRefsItem);
    return this;
  }

   /**
   * Get apiClusterRefs
   * @return apiClusterRefs
  **/
  @Schema(description = "")
  public List<ApiClusterRef> getApiClusterRefs() {
    return apiClusterRefs;
  }

  public void setApiClusterRefs(List<ApiClusterRef> apiClusterRefs) {
    this.apiClusterRefs = apiClusterRefs;
  }

  public ApiTagToEntities apiServiceRefs(List<ApiServiceRef> apiServiceRefs) {
    this.apiServiceRefs = apiServiceRefs;
    return this;
  }

  public ApiTagToEntities addApiServiceRefsItem(ApiServiceRef apiServiceRefsItem) {
    if (this.apiServiceRefs == null) {
      this.apiServiceRefs = new ArrayList<>();
    }
    this.apiServiceRefs.add(apiServiceRefsItem);
    return this;
  }

   /**
   * Get apiServiceRefs
   * @return apiServiceRefs
  **/
  @Schema(description = "")
  public List<ApiServiceRef> getApiServiceRefs() {
    return apiServiceRefs;
  }

  public void setApiServiceRefs(List<ApiServiceRef> apiServiceRefs) {
    this.apiServiceRefs = apiServiceRefs;
  }

  public ApiTagToEntities apiRoleRefs(List<ApiRoleRef> apiRoleRefs) {
    this.apiRoleRefs = apiRoleRefs;
    return this;
  }

  public ApiTagToEntities addApiRoleRefsItem(ApiRoleRef apiRoleRefsItem) {
    if (this.apiRoleRefs == null) {
      this.apiRoleRefs = new ArrayList<>();
    }
    this.apiRoleRefs.add(apiRoleRefsItem);
    return this;
  }

   /**
   * Get apiRoleRefs
   * @return apiRoleRefs
  **/
  @Schema(description = "")
  public List<ApiRoleRef> getApiRoleRefs() {
    return apiRoleRefs;
  }

  public void setApiRoleRefs(List<ApiRoleRef> apiRoleRefs) {
    this.apiRoleRefs = apiRoleRefs;
  }

  public ApiTagToEntities apiHostRefs(List<ApiHostRef> apiHostRefs) {
    this.apiHostRefs = apiHostRefs;
    return this;
  }

  public ApiTagToEntities addApiHostRefsItem(ApiHostRef apiHostRefsItem) {
    if (this.apiHostRefs == null) {
      this.apiHostRefs = new ArrayList<>();
    }
    this.apiHostRefs.add(apiHostRefsItem);
    return this;
  }

   /**
   * Get apiHostRefs
   * @return apiHostRefs
  **/
  @Schema(description = "")
  public List<ApiHostRef> getApiHostRefs() {
    return apiHostRefs;
  }

  public void setApiHostRefs(List<ApiHostRef> apiHostRefs) {
    this.apiHostRefs = apiHostRefs;
  }

  public ApiTagToEntities apiControlPlaneRefs(List<ApiControlPlaneRef> apiControlPlaneRefs) {
    this.apiControlPlaneRefs = apiControlPlaneRefs;
    return this;
  }

  public ApiTagToEntities addApiControlPlaneRefsItem(ApiControlPlaneRef apiControlPlaneRefsItem) {
    if (this.apiControlPlaneRefs == null) {
      this.apiControlPlaneRefs = new ArrayList<>();
    }
    this.apiControlPlaneRefs.add(apiControlPlaneRefsItem);
    return this;
  }

   /**
   * Get apiControlPlaneRefs
   * @return apiControlPlaneRefs
  **/
  @Schema(description = "")
  public List<ApiControlPlaneRef> getApiControlPlaneRefs() {
    return apiControlPlaneRefs;
  }

  public void setApiControlPlaneRefs(List<ApiControlPlaneRef> apiControlPlaneRefs) {
    this.apiControlPlaneRefs = apiControlPlaneRefs;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiTagToEntities apiTagToEntities = (ApiTagToEntities) o;
    return Objects.equals(this.name, apiTagToEntities.name) &&
        Objects.equals(this.value, apiTagToEntities.value) &&
        Objects.equals(this.apiClusterRefs, apiTagToEntities.apiClusterRefs) &&
        Objects.equals(this.apiServiceRefs, apiTagToEntities.apiServiceRefs) &&
        Objects.equals(this.apiRoleRefs, apiTagToEntities.apiRoleRefs) &&
        Objects.equals(this.apiHostRefs, apiTagToEntities.apiHostRefs) &&
        Objects.equals(this.apiControlPlaneRefs, apiTagToEntities.apiControlPlaneRefs);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, value, apiClusterRefs, apiServiceRefs, apiRoleRefs, apiHostRefs, apiControlPlaneRefs);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiTagToEntities {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    value: ").append(toIndentedString(value)).append("\n");
    sb.append("    apiClusterRefs: ").append(toIndentedString(apiClusterRefs)).append("\n");
    sb.append("    apiServiceRefs: ").append(toIndentedString(apiServiceRefs)).append("\n");
    sb.append("    apiRoleRefs: ").append(toIndentedString(apiRoleRefs)).append("\n");
    sb.append("    apiHostRefs: ").append(toIndentedString(apiHostRefs)).append("\n");
    sb.append("    apiControlPlaneRefs: ").append(toIndentedString(apiControlPlaneRefs)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
