/* tslint:disable */
/* eslint-disable */
/**
 * AutoGlue API
 * API for managing K3s clusters across cloud providers
 *
 * The version of the OpenAPI document: dev
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from "../runtime";
/**
 *
 * @export
 * @interface DtoCreateSSHRequest
 */
export interface DtoCreateSSHRequest {
  /**
   * Only for RSA
   * @type {number}
   * @memberof DtoCreateSSHRequest
   */
  bits?: number;
  /**
   *
   * @type {string}
   * @memberof DtoCreateSSHRequest
   */
  comment?: string;
  /**
   *
   * @type {string}
   * @memberof DtoCreateSSHRequest
   */
  name?: string;
  /**
   * "rsa" (default) or "ed25519"
   * @type {string}
   * @memberof DtoCreateSSHRequest
   */
  type?: string;
}

/**
 * Check if a given object implements the DtoCreateSSHRequest interface.
 */
export function instanceOfDtoCreateSSHRequest(
  value: object,
): value is DtoCreateSSHRequest {
  return true;
}

export function DtoCreateSSHRequestFromJSON(json: any): DtoCreateSSHRequest {
  return DtoCreateSSHRequestFromJSONTyped(json, false);
}

export function DtoCreateSSHRequestFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): DtoCreateSSHRequest {
  if (json == null) {
    return json;
  }
  return {
    bits: json["bits"] == null ? undefined : json["bits"],
    comment: json["comment"] == null ? undefined : json["comment"],
    name: json["name"] == null ? undefined : json["name"],
    type: json["type"] == null ? undefined : json["type"],
  };
}

export function DtoCreateSSHRequestToJSON(json: any): DtoCreateSSHRequest {
  return DtoCreateSSHRequestToJSONTyped(json, false);
}

export function DtoCreateSSHRequestToJSONTyped(
  value?: DtoCreateSSHRequest | null,
  ignoreDiscriminator: boolean = false,
): any {
  if (value == null) {
    return value;
  }

  return {
    bits: value["bits"],
    comment: value["comment"],
    name: value["name"],
    type: value["type"],
  };
}
