/*
 * 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.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.HashMap;
import java.util.List;
import java.util.Map;
/**
 * This is the model for a component in the host.
 */
@Schema(description = "This is the model for a component in the host.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

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

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

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

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

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

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

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

  @SerializedName("componentConfig")
  private Map<String, String> componentConfig = null;

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

   /**
   * The name of the component.
   * @return name
  **/
  @Schema(description = "The name of the component.")
  public String getName() {
    return name;
  }

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

  public ApiComponentInfo cdhVersion(String cdhVersion) {
    this.cdhVersion = cdhVersion;
    return this;
  }

   /**
   * The CDH version on the host.
   * @return cdhVersion
  **/
  @Schema(description = "The CDH version on the host.")
  public String getCdhVersion() {
    return cdhVersion;
  }

  public void setCdhVersion(String cdhVersion) {
    this.cdhVersion = cdhVersion;
  }

  public ApiComponentInfo cdhRelease(String cdhRelease) {
    this.cdhRelease = cdhRelease;
    return this;
  }

   /**
   * CDH release on the host.
   * @return cdhRelease
  **/
  @Schema(description = "CDH release on the host.")
  public String getCdhRelease() {
    return cdhRelease;
  }

  public void setCdhRelease(String cdhRelease) {
    this.cdhRelease = cdhRelease;
  }

  public ApiComponentInfo componentVersion(String componentVersion) {
    this.componentVersion = componentVersion;
    return this;
  }

   /**
   * Component version on the host.
   * @return componentVersion
  **/
  @Schema(description = "Component version on the host.")
  public String getComponentVersion() {
    return componentVersion;
  }

  public void setComponentVersion(String componentVersion) {
    this.componentVersion = componentVersion;
  }

  public ApiComponentInfo componentRelease(String componentRelease) {
    this.componentRelease = componentRelease;
    return this;
  }

   /**
   * Component release on the host.
   * @return componentRelease
  **/
  @Schema(description = "Component release on the host.")
  public String getComponentRelease() {
    return componentRelease;
  }

  public void setComponentRelease(String componentRelease) {
    this.componentRelease = componentRelease;
  }

  public ApiComponentInfo componentInfoSource(String componentInfoSource) {
    this.componentInfoSource = componentInfoSource;
    return this;
  }

   /**
   * Source from which component is taken.
   * @return componentInfoSource
  **/
  @Schema(description = "Source from which component is taken.")
  public String getComponentInfoSource() {
    return componentInfoSource;
  }

  public void setComponentInfoSource(String componentInfoSource) {
    this.componentInfoSource = componentInfoSource;
  }

  public ApiComponentInfo isActive(Boolean isActive) {
    this.isActive = isActive;
    return this;
  }

   /**
   * returns true if component is active.
   * @return isActive
  **/
  @Schema(description = "returns true if component is active.")
  public Boolean isIsActive() {
    return isActive;
  }

  public void setIsActive(Boolean isActive) {
    this.isActive = isActive;
  }

  public ApiComponentInfo componentConfig(Map<String, String> componentConfig) {
    this.componentConfig = componentConfig;
    return this;
  }

  public ApiComponentInfo putComponentConfigItem(String key, String componentConfigItem) {
    if (this.componentConfig == null) {
      this.componentConfig = new HashMap<>();
    }
    this.componentConfig.put(key, componentConfigItem);
    return this;
  }

   /**
   * list of config name and value pair associated with component.
   * @return componentConfig
  **/
  @Schema(description = "list of config name and value pair associated with component.")
  public Map<String, String> getComponentConfig() {
    return componentConfig;
  }

  public void setComponentConfig(Map<String, String> componentConfig) {
    this.componentConfig = componentConfig;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiComponentInfo apiComponentInfo = (ApiComponentInfo) o;
    return Objects.equals(this.name, apiComponentInfo.name) &&
        Objects.equals(this.cdhVersion, apiComponentInfo.cdhVersion) &&
        Objects.equals(this.cdhRelease, apiComponentInfo.cdhRelease) &&
        Objects.equals(this.componentVersion, apiComponentInfo.componentVersion) &&
        Objects.equals(this.componentRelease, apiComponentInfo.componentRelease) &&
        Objects.equals(this.componentInfoSource, apiComponentInfo.componentInfoSource) &&
        Objects.equals(this.isActive, apiComponentInfo.isActive) &&
        Objects.equals(this.componentConfig, apiComponentInfo.componentConfig);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, cdhVersion, cdhRelease, componentVersion, componentRelease, componentInfoSource, isActive, componentConfig);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiComponentInfo {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    cdhVersion: ").append(toIndentedString(cdhVersion)).append("\n");
    sb.append("    cdhRelease: ").append(toIndentedString(cdhRelease)).append("\n");
    sb.append("    componentVersion: ").append(toIndentedString(componentVersion)).append("\n");
    sb.append("    componentRelease: ").append(toIndentedString(componentRelease)).append("\n");
    sb.append("    componentInfoSource: ").append(toIndentedString(componentInfoSource)).append("\n");
    sb.append("    isActive: ").append(toIndentedString(isActive)).append("\n");
    sb.append("    componentConfig: ").append(toIndentedString(componentConfig)).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    ");
  }

}
