/* 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 HandlersOrgKeyCreateReq
 */
export interface HandlersOrgKeyCreateReq {
  /**
   *
   * @type {number}
   * @memberof HandlersOrgKeyCreateReq
   */
  expires_in_hours?: number;
  /**
   *
   * @type {string}
   * @memberof HandlersOrgKeyCreateReq
   */
  name?: string;
}

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

export function HandlersOrgKeyCreateReqFromJSON(
  json: any,
): HandlersOrgKeyCreateReq {
  return HandlersOrgKeyCreateReqFromJSONTyped(json, false);
}

export function HandlersOrgKeyCreateReqFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): HandlersOrgKeyCreateReq {
  if (json == null) {
    return json;
  }
  return {
    expires_in_hours:
      json["expires_in_hours"] == null ? undefined : json["expires_in_hours"],
    name: json["name"] == null ? undefined : json["name"],
  };
}

export function HandlersOrgKeyCreateReqToJSON(
  json: any,
): HandlersOrgKeyCreateReq {
  return HandlersOrgKeyCreateReqToJSONTyped(json, false);
}

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

  return {
    expires_in_hours: value["expires_in_hours"],
    name: value["name"],
  };
}
