/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v50</h1>       <p>Introduced in Cloudera Manager 7.8.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.8.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 com.cloudera.api.swagger.model.ApiClusterTemplateClusterSpec;
import com.cloudera.api.swagger.model.ApiClusterTemplateHostInfo;
import com.cloudera.api.swagger.model.ApiClusterTemplateRoleConfigGroupInfo;
import com.cloudera.api.swagger.model.ApiClusterTemplateVariable;
import com.cloudera.api.swagger.model.ApiConfigureForKerberosArguments;
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;

/**
 * Details of cluster template
 */
@ApiModel(description = "Details of cluster template")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-17T16:38:34.097Z")
public class ApiClusterTemplateInstantiator {
  @SerializedName("clusterName")
  private String clusterName = null;

  @SerializedName("hosts")
  private List<ApiClusterTemplateHostInfo> hosts = null;

  @SerializedName("variables")
  private List<ApiClusterTemplateVariable> variables = null;

  @SerializedName("roleConfigGroups")
  private List<ApiClusterTemplateRoleConfigGroupInfo> roleConfigGroups = null;

  @SerializedName("clusterSpec")
  private ApiClusterTemplateClusterSpec clusterSpec = null;

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

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

  @SerializedName("enableKerberos")
  private ApiConfigureForKerberosArguments enableKerberos = null;

  public ApiClusterTemplateInstantiator clusterName(String clusterName) {
    this.clusterName = clusterName;
    return this;
  }

   /**
   * Cluster name
   * @return clusterName
  **/
  @ApiModelProperty(value = "Cluster name")
  public String getClusterName() {
    return clusterName;
  }

  public void setClusterName(String clusterName) {
    this.clusterName = clusterName;
  }

  public ApiClusterTemplateInstantiator hosts(List<ApiClusterTemplateHostInfo> hosts) {
    this.hosts = hosts;
    return this;
  }

  public ApiClusterTemplateInstantiator addHostsItem(ApiClusterTemplateHostInfo hostsItem) {
    if (this.hosts == null) {
      this.hosts = new ArrayList<ApiClusterTemplateHostInfo>();
    }
    this.hosts.add(hostsItem);
    return this;
  }

   /**
   * All the hosts that are part of that cluster
   * @return hosts
  **/
  @ApiModelProperty(value = "All the hosts that are part of that cluster")
  public List<ApiClusterTemplateHostInfo> getHosts() {
    return hosts;
  }

  public void setHosts(List<ApiClusterTemplateHostInfo> hosts) {
    this.hosts = hosts;
  }

  public ApiClusterTemplateInstantiator variables(List<ApiClusterTemplateVariable> variables) {
    this.variables = variables;
    return this;
  }

  public ApiClusterTemplateInstantiator addVariablesItem(ApiClusterTemplateVariable variablesItem) {
    if (this.variables == null) {
      this.variables = new ArrayList<ApiClusterTemplateVariable>();
    }
    this.variables.add(variablesItem);
    return this;
  }

   /**
   * All the variables the are referred by the cluster template
   * @return variables
  **/
  @ApiModelProperty(value = "All the variables the are referred by the cluster template")
  public List<ApiClusterTemplateVariable> getVariables() {
    return variables;
  }

  public void setVariables(List<ApiClusterTemplateVariable> variables) {
    this.variables = variables;
  }

  public ApiClusterTemplateInstantiator roleConfigGroups(List<ApiClusterTemplateRoleConfigGroupInfo> roleConfigGroups) {
    this.roleConfigGroups = roleConfigGroups;
    return this;
  }

  public ApiClusterTemplateInstantiator addRoleConfigGroupsItem(ApiClusterTemplateRoleConfigGroupInfo roleConfigGroupsItem) {
    if (this.roleConfigGroups == null) {
      this.roleConfigGroups = new ArrayList<ApiClusterTemplateRoleConfigGroupInfo>();
    }
    this.roleConfigGroups.add(roleConfigGroupsItem);
    return this;
  }

   /**
   * All the role config group informations for non-base RCGs.
   * @return roleConfigGroups
  **/
  @ApiModelProperty(value = "All the role config group informations for non-base RCGs.")
  public List<ApiClusterTemplateRoleConfigGroupInfo> getRoleConfigGroups() {
    return roleConfigGroups;
  }

  public void setRoleConfigGroups(List<ApiClusterTemplateRoleConfigGroupInfo> roleConfigGroups) {
    this.roleConfigGroups = roleConfigGroups;
  }

  public ApiClusterTemplateInstantiator clusterSpec(ApiClusterTemplateClusterSpec clusterSpec) {
    this.clusterSpec = clusterSpec;
    return this;
  }

   /**
   * Cluster specification.
   * @return clusterSpec
  **/
  @ApiModelProperty(value = "Cluster specification.")
  public ApiClusterTemplateClusterSpec getClusterSpec() {
    return clusterSpec;
  }

  public void setClusterSpec(ApiClusterTemplateClusterSpec clusterSpec) {
    this.clusterSpec = clusterSpec;
  }

  public ApiClusterTemplateInstantiator keepHostTemplates(Boolean keepHostTemplates) {
    this.keepHostTemplates = keepHostTemplates;
    return this;
  }

   /**
   * Keep the hosts templates from cluster template.
   * @return keepHostTemplates
  **/
  @ApiModelProperty(value = "Keep the hosts templates from cluster template.")
  public Boolean getKeepHostTemplates() {
    return keepHostTemplates;
  }

  public void setKeepHostTemplates(Boolean keepHostTemplates) {
    this.keepHostTemplates = keepHostTemplates;
  }

  public ApiClusterTemplateInstantiator lenient(Boolean lenient) {
    this.lenient = lenient;
    return this;
  }

   /**
   * Allow setting service parameters that may not currently be supported by the current CM version but will be in the future.
   * @return lenient
  **/
  @ApiModelProperty(value = "Allow setting service parameters that may not currently be supported by the current CM version but will be in the future.")
  public Boolean getLenient() {
    return lenient;
  }

  public void setLenient(Boolean lenient) {
    this.lenient = lenient;
  }

  public ApiClusterTemplateInstantiator enableKerberos(ApiConfigureForKerberosArguments enableKerberos) {
    this.enableKerberos = enableKerberos;
    return this;
  }

   /**
   * Enable kerberos authentication
   * @return enableKerberos
  **/
  @ApiModelProperty(value = "Enable kerberos authentication")
  public ApiConfigureForKerberosArguments getEnableKerberos() {
    return enableKerberos;
  }

  public void setEnableKerberos(ApiConfigureForKerberosArguments enableKerberos) {
    this.enableKerberos = enableKerberos;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiClusterTemplateInstantiator apiClusterTemplateInstantiator = (ApiClusterTemplateInstantiator) o;
    return Objects.equals(this.clusterName, apiClusterTemplateInstantiator.clusterName) &&
        Objects.equals(this.hosts, apiClusterTemplateInstantiator.hosts) &&
        Objects.equals(this.variables, apiClusterTemplateInstantiator.variables) &&
        Objects.equals(this.roleConfigGroups, apiClusterTemplateInstantiator.roleConfigGroups) &&
        Objects.equals(this.clusterSpec, apiClusterTemplateInstantiator.clusterSpec) &&
        Objects.equals(this.keepHostTemplates, apiClusterTemplateInstantiator.keepHostTemplates) &&
        Objects.equals(this.lenient, apiClusterTemplateInstantiator.lenient) &&
        Objects.equals(this.enableKerberos, apiClusterTemplateInstantiator.enableKerberos);
  }

  @Override
  public int hashCode() {
    return Objects.hash(clusterName, hosts, variables, roleConfigGroups, clusterSpec, keepHostTemplates, lenient, enableKerberos);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiClusterTemplateInstantiator {\n");
    
    sb.append("    clusterName: ").append(toIndentedString(clusterName)).append("\n");
    sb.append("    hosts: ").append(toIndentedString(hosts)).append("\n");
    sb.append("    variables: ").append(toIndentedString(variables)).append("\n");
    sb.append("    roleConfigGroups: ").append(toIndentedString(roleConfigGroups)).append("\n");
    sb.append("    clusterSpec: ").append(toIndentedString(clusterSpec)).append("\n");
    sb.append("    keepHostTemplates: ").append(toIndentedString(keepHostTemplates)).append("\n");
    sb.append("    lenient: ").append(toIndentedString(lenient)).append("\n");
    sb.append("    enableKerberos: ").append(toIndentedString(enableKerberos)).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    ");
  }
  
}

