/* 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 DtoJWK
 */
export interface DtoJWK {
  /**
   *
   * @type {string}
   * @memberof DtoJWK
   */
  alg?: string;
  /**
   *
   * @type {string}
   * @memberof DtoJWK
   */
  e?: string;
  /**
   *
   * @type {string}
   * @memberof DtoJWK
   */
  kid?: string;
  /**
   *
   * @type {string}
   * @memberof DtoJWK
   */
  kty?: string;
  /**
   *
   * @type {string}
   * @memberof DtoJWK
   */
  n?: string;
  /**
   *
   * @type {string}
   * @memberof DtoJWK
   */
  use?: string;
  /**
   *
   * @type {string}
   * @memberof DtoJWK
   */
  x?: string;
}

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

export function DtoJWKFromJSON(json: any): DtoJWK {
  return DtoJWKFromJSONTyped(json, false);
}

export function DtoJWKFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): DtoJWK {
  if (json == null) {
    return json;
  }
  return {
    alg: json["alg"] == null ? undefined : json["alg"],
    e: json["e"] == null ? undefined : json["e"],
    kid: json["kid"] == null ? undefined : json["kid"],
    kty: json["kty"] == null ? undefined : json["kty"],
    n: json["n"] == null ? undefined : json["n"],
    use: json["use"] == null ? undefined : json["use"],
    x: json["x"] == null ? undefined : json["x"],
  };
}

export function DtoJWKToJSON(json: any): DtoJWK {
  return DtoJWKToJSONTyped(json, false);
}

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

  return {
    alg: value["alg"],
    e: value["e"],
    kid: value["kid"],
    kty: value["kty"],
    n: value["n"],
    use: value["use"],
    x: value["x"],
  };
}
