/*
 * 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.ApiConfigList;
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;
/**
 * A role config group contains roles of the same role type sharing the same configuration. While each role has to belong to a group, a role config group may be empty.  There exists a default role config group for each role type. Default groups cannot be removed nor created.  The name of a role config group is unique and cannot be changed.  The configuration of individual roles may be overridden on role level.
 */
@Schema(description = "A role config group contains roles of the same role type sharing the same configuration. While each role has to belong to a group, a role config group may be empty.  There exists a default role config group for each role type. Default groups cannot be removed nor created.  The name of a role config group is unique and cannot be changed.  The configuration of individual roles may be overridden on role level.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

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

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

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

  @SerializedName("config")
  private ApiConfigList config = null;

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

  @SerializedName("serviceRef")
  private ApiServiceRef serviceRef = null;

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

   /**
   * Readonly. The unique name of this role config group.
   * @return name
  **/
  @Schema(description = "Readonly. The unique name of this role config group.")
  public String getName() {
    return name;
  }

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

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

   /**
   * Readonly. The type of the roles in this group.
   * @return roleType
  **/
  @Schema(description = "Readonly. The type of the roles in this group.")
  public String getRoleType() {
    return roleType;
  }

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

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

   /**
   * Readonly. Indicates whether this is a base group.
   * @return base
  **/
  @Schema(description = "Readonly. Indicates whether this is a base group.")
  public Boolean isBase() {
    return base;
  }

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

  public ApiRoleConfigGroup config(ApiConfigList config) {
    this.config = config;
    return this;
  }

   /**
   * Get config
   * @return config
  **/
  @Schema(description = "")
  public ApiConfigList getConfig() {
    return config;
  }

  public void setConfig(ApiConfigList config) {
    this.config = config;
  }

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

   /**
   * The display name of this group.
   * @return displayName
  **/
  @Schema(description = "The display name of this group.")
  public String getDisplayName() {
    return displayName;
  }

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

  public ApiRoleConfigGroup serviceRef(ApiServiceRef serviceRef) {
    this.serviceRef = serviceRef;
    return this;
  }

   /**
   * Get serviceRef
   * @return serviceRef
  **/
  @Schema(description = "")
  public ApiServiceRef getServiceRef() {
    return serviceRef;
  }

  public void setServiceRef(ApiServiceRef serviceRef) {
    this.serviceRef = serviceRef;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiRoleConfigGroup apiRoleConfigGroup = (ApiRoleConfigGroup) o;
    return Objects.equals(this.name, apiRoleConfigGroup.name) &&
        Objects.equals(this.roleType, apiRoleConfigGroup.roleType) &&
        Objects.equals(this.base, apiRoleConfigGroup.base) &&
        Objects.equals(this.config, apiRoleConfigGroup.config) &&
        Objects.equals(this.displayName, apiRoleConfigGroup.displayName) &&
        Objects.equals(this.serviceRef, apiRoleConfigGroup.serviceRef);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, roleType, base, config, displayName, serviceRef);
  }


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

}
