/*
 * 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;
/**
 * Contains common arguments for commands which require SSH&#x27;ing into one or more hosts.
 */
@Schema(description = "Contains common arguments for commands which require SSH'ing into one or more hosts.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class BaseApiSshCmdArguments {
  @SerializedName("sshPort")
  private java.math.BigDecimal sshPort = null;

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

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

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

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

  public BaseApiSshCmdArguments sshPort(java.math.BigDecimal sshPort) {
    this.sshPort = sshPort;
    return this;
  }

   /**
   * SSH port. If unset, defaults to 22.
   * @return sshPort
  **/
  @Schema(example = "22", description = "SSH port. If unset, defaults to 22.")
  public java.math.BigDecimal getSshPort() {
    return sshPort;
  }

  public void setSshPort(java.math.BigDecimal sshPort) {
    this.sshPort = sshPort;
  }

  public BaseApiSshCmdArguments userName(String userName) {
    this.userName = userName;
    return this;
  }

   /**
   * The username used to authenticate with the hosts. Root access to your hosts is required to install Cloudera packages. The installer will connect to your hosts via SSH and log in either directly as root or as another user with password-less sudo privileges to become root.
   * @return userName
  **/
  @Schema(description = "The username used to authenticate with the hosts. Root access to your hosts is required to install Cloudera packages. The installer will connect to your hosts via SSH and log in either directly as root or as another user with password-less sudo privileges to become root.")
  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public BaseApiSshCmdArguments password(String password) {
    this.password = password;
    return this;
  }

   /**
   * The password used to authenticate with the hosts. Specify either this or a private key. For password-less login, use an empty string as password.
   * @return password
  **/
  @Schema(description = "The password used to authenticate with the hosts. Specify either this or a private key. For password-less login, use an empty string as password.")
  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public BaseApiSshCmdArguments privateKey(String privateKey) {
    this.privateKey = privateKey;
    return this;
  }

   /**
   * The private key to authenticate with the hosts. Specify either this or a password. &lt;br&gt; The private key, if specified, needs to be a standard PEM-encoded key as a single string, with all line breaks replaced with the line-feed control character &#x27;\\n&#x27;. &lt;br&gt; A value will typically look like the following string: &lt;br&gt; -----BEGIN RSA PRIVATE KEY-----\\n[base-64 encoded key]\\n-----END RSA PRIVATE KEY----- &lt;br&gt;
   * @return privateKey
  **/
  @Schema(description = "The private key to authenticate with the hosts. Specify either this or a password. <br> The private key, if specified, needs to be a standard PEM-encoded key as a single string, with all line breaks replaced with the line-feed control character '\\n'. <br> A value will typically look like the following string: <br> -----BEGIN RSA PRIVATE KEY-----\\n[base-64 encoded key]\\n-----END RSA PRIVATE KEY----- <br>")
  public String getPrivateKey() {
    return privateKey;
  }

  public void setPrivateKey(String privateKey) {
    this.privateKey = privateKey;
  }

  public BaseApiSshCmdArguments passphrase(String passphrase) {
    this.passphrase = passphrase;
    return this;
  }

   /**
   * The passphrase associated with the private key used to authenticate with the hosts (optional).
   * @return passphrase
  **/
  @Schema(description = "The passphrase associated with the private key used to authenticate with the hosts (optional).")
  public String getPassphrase() {
    return passphrase;
  }

  public void setPassphrase(String passphrase) {
    this.passphrase = passphrase;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BaseApiSshCmdArguments baseApiSshCmdArguments = (BaseApiSshCmdArguments) o;
    return Objects.equals(this.sshPort, baseApiSshCmdArguments.sshPort) &&
        Objects.equals(this.userName, baseApiSshCmdArguments.userName) &&
        Objects.equals(this.password, baseApiSshCmdArguments.password) &&
        Objects.equals(this.privateKey, baseApiSshCmdArguments.privateKey) &&
        Objects.equals(this.passphrase, baseApiSshCmdArguments.passphrase);
  }

  @Override
  public int hashCode() {
    return Objects.hash(sshPort, userName, password, privateKey, passphrase);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BaseApiSshCmdArguments {\n");
    
    sb.append("    sshPort: ").append(toIndentedString(sshPort)).append("\n");
    sb.append("    userName: ").append(toIndentedString(userName)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).append("\n");
    sb.append("    privateKey: ").append(toIndentedString(privateKey)).append("\n");
    sb.append("    passphrase: ").append(toIndentedString(passphrase)).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    ");
  }

}
