/*
 * 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.ApiHostCertInfo;
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;
/**
 * Arguments to add custom certificates to the Auto-TLS certificate database
 */
@Schema(description = "Arguments to add custom certificates to the Auto-TLS certificate database")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiAddCustomCertsArguments {
  @SerializedName("location")
  private String location = null;

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

  @SerializedName("hostCerts")
  private List<ApiHostCertInfo> hostCerts = null;

  public ApiAddCustomCertsArguments location(String location) {
    this.location = location;
    return this;
  }

   /**
   * The location on disk to store the CMCA directory. If there is already a CMCA created there, it will be backed up, and a new one will be created in its place.
   * @return location
  **/
  @Schema(example = "/opt/cloudera/CMCA", description = "The location on disk to store the CMCA directory. If there is already a CMCA created there, it will be backed up, and a new one will be created in its place.")
  public String getLocation() {
    return location;
  }

  public void setLocation(String location) {
    this.location = location;
  }

  public ApiAddCustomCertsArguments interpretAsFilenames(Boolean interpretAsFilenames) {
    this.interpretAsFilenames = interpretAsFilenames;
    return this;
  }

   /**
   * Whether the following arguments are interpreted as filenames local to the Cloudera Manager host (true, default) or as the actual data for that argument: * hostCerts.hostCert * hostCerts.hostKey  If HTTPS has not been enabled on the Cloudera Manager Admin Console and API, we *strongly* recommend that you pass the arguments as filenames local to the Cloudera Manager host (i.e. set to true) to avoid leaking sensitive information over the wire in plaintext.
   * @return interpretAsFilenames
  **/
  @Schema(example = "true", description = "Whether the following arguments are interpreted as filenames local to the Cloudera Manager host (true, default) or as the actual data for that argument: * hostCerts.hostCert * hostCerts.hostKey  If HTTPS has not been enabled on the Cloudera Manager Admin Console and API, we *strongly* recommend that you pass the arguments as filenames local to the Cloudera Manager host (i.e. set to true) to avoid leaking sensitive information over the wire in plaintext.")
  public Boolean isInterpretAsFilenames() {
    return interpretAsFilenames;
  }

  public void setInterpretAsFilenames(Boolean interpretAsFilenames) {
    this.interpretAsFilenames = interpretAsFilenames;
  }

  public ApiAddCustomCertsArguments hostCerts(List<ApiHostCertInfo> hostCerts) {
    this.hostCerts = hostCerts;
    return this;
  }

  public ApiAddCustomCertsArguments addHostCertsItem(ApiHostCertInfo hostCertsItem) {
    if (this.hostCerts == null) {
      this.hostCerts = new ArrayList<>();
    }
    this.hostCerts.add(hostCertsItem);
    return this;
  }

   /**
   * A list of HostCertInfo objects, which associate a hostname with the corresponding certificate and private key. Only used if customCA &#x3D;&#x3D; true.
   * @return hostCerts
  **/
  @Schema(description = "A list of HostCertInfo objects, which associate a hostname with the corresponding certificate and private key. Only used if customCA == true.")
  public List<ApiHostCertInfo> getHostCerts() {
    return hostCerts;
  }

  public void setHostCerts(List<ApiHostCertInfo> hostCerts) {
    this.hostCerts = hostCerts;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiAddCustomCertsArguments apiAddCustomCertsArguments = (ApiAddCustomCertsArguments) o;
    return Objects.equals(this.location, apiAddCustomCertsArguments.location) &&
        Objects.equals(this.interpretAsFilenames, apiAddCustomCertsArguments.interpretAsFilenames) &&
        Objects.equals(this.hostCerts, apiAddCustomCertsArguments.hostCerts);
  }

  @Override
  public int hashCode() {
    return Objects.hash(location, interpretAsFilenames, hostCerts);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiAddCustomCertsArguments {\n");
    
    sb.append("    location: ").append(toIndentedString(location)).append("\n");
    sb.append("    interpretAsFilenames: ").append(toIndentedString(interpretAsFilenames)).append("\n");
    sb.append("    hostCerts: ").append(toIndentedString(hostCerts)).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    ");
  }

}
