/*
 * 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.ApiClusterTemplateConfig;
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;
/**
 * Role config group info.
 */
@Schema(description = "Role config group info.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiClusterTemplateRoleConfigGroup {
  @SerializedName("refName")
  private String refName = null;

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

  @SerializedName("base")
  private Boolean base = null;

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

  @SerializedName("configs")
  private List<ApiClusterTemplateConfig> configs = null;

  public ApiClusterTemplateRoleConfigGroup refName(String refName) {
    this.refName = refName;
    return this;
  }

   /**
   * The reference name of the role config.
   * @return refName
  **/
  @Schema(description = "The reference name of the role config.")
  public String getRefName() {
    return refName;
  }

  public void setRefName(String refName) {
    this.refName = refName;
  }

  public ApiClusterTemplateRoleConfigGroup roleType(String roleType) {
    this.roleType = roleType;
    return this;
  }

   /**
   * Role type
   * @return roleType
  **/
  @Schema(description = "Role type")
  public String getRoleType() {
    return roleType;
  }

  public void setRoleType(String roleType) {
    this.roleType = roleType;
  }

  public ApiClusterTemplateRoleConfigGroup base(Boolean base) {
    this.base = base;
    return this;
  }

   /**
   * If true then it is the base config group for that role. There can only be one base role config group for a given role type. Defaults to false.
   * @return base
  **/
  @Schema(description = "If true then it is the base config group for that role. There can only be one base role config group for a given role type. Defaults to false.")
  public Boolean isBase() {
    return base;
  }

  public void setBase(Boolean base) {
    this.base = base;
  }

  public ApiClusterTemplateRoleConfigGroup displayName(String displayName) {
    this.displayName = displayName;
    return this;
  }

   /**
   * Role config group display name
   * @return displayName
  **/
  @Schema(description = "Role config group display name")
  public String getDisplayName() {
    return displayName;
  }

  public void setDisplayName(String displayName) {
    this.displayName = displayName;
  }

  public ApiClusterTemplateRoleConfigGroup configs(List<ApiClusterTemplateConfig> configs) {
    this.configs = configs;
    return this;
  }

  public ApiClusterTemplateRoleConfigGroup addConfigsItem(ApiClusterTemplateConfig configsItem) {
    if (this.configs == null) {
      this.configs = new ArrayList<>();
    }
    this.configs.add(configsItem);
    return this;
  }

   /**
   * List of configurations
   * @return configs
  **/
  @Schema(description = "List of configurations")
  public List<ApiClusterTemplateConfig> getConfigs() {
    return configs;
  }

  public void setConfigs(List<ApiClusterTemplateConfig> configs) {
    this.configs = configs;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiClusterTemplateRoleConfigGroup apiClusterTemplateRoleConfigGroup = (ApiClusterTemplateRoleConfigGroup) o;
    return Objects.equals(this.refName, apiClusterTemplateRoleConfigGroup.refName) &&
        Objects.equals(this.roleType, apiClusterTemplateRoleConfigGroup.roleType) &&
        Objects.equals(this.base, apiClusterTemplateRoleConfigGroup.base) &&
        Objects.equals(this.displayName, apiClusterTemplateRoleConfigGroup.displayName) &&
        Objects.equals(this.configs, apiClusterTemplateRoleConfigGroup.configs);
  }

  @Override
  public int hashCode() {
    return Objects.hash(refName, roleType, base, displayName, configs);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiClusterTemplateRoleConfigGroup {\n");
    
    sb.append("    refName: ").append(toIndentedString(refName)).append("\n");
    sb.append("    roleType: ").append(toIndentedString(roleType)).append("\n");
    sb.append("    base: ").append(toIndentedString(base)).append("\n");
    sb.append("    displayName: ").append(toIndentedString(displayName)).append("\n");
    sb.append("    configs: ").append(toIndentedString(configs)).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    ");
  }

}
