/* 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 HandlersOrgKeyCreateResp
 */
export interface HandlersOrgKeyCreateResp {
  /**
   *
   * @type {string}
   * @memberof HandlersOrgKeyCreateResp
   */
  created_at?: string;
  /**
   *
   * @type {string}
   * @memberof HandlersOrgKeyCreateResp
   */
  expires_at?: string;
  /**
   *
   * @type {string}
   * @memberof HandlersOrgKeyCreateResp
   */
  id?: string;
  /**
   *
   * @type {string}
   * @memberof HandlersOrgKeyCreateResp
   */
  name?: string;
  /**
   * shown once:
   * @type {string}
   * @memberof HandlersOrgKeyCreateResp
   */
  org_key?: string;
  /**
   * shown once:
   * @type {string}
   * @memberof HandlersOrgKeyCreateResp
   */
  org_secret?: string;
  /**
   * "org"
   * @type {string}
   * @memberof HandlersOrgKeyCreateResp
   */
  scope?: string;
}

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

export function HandlersOrgKeyCreateRespFromJSON(
  json: any,
): HandlersOrgKeyCreateResp {
  return HandlersOrgKeyCreateRespFromJSONTyped(json, false);
}

export function HandlersOrgKeyCreateRespFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): HandlersOrgKeyCreateResp {
  if (json == null) {
    return json;
  }
  return {
    created_at: json["created_at"] == null ? undefined : json["created_at"],
    expires_at: json["expires_at"] == null ? undefined : json["expires_at"],
    id: json["id"] == null ? undefined : json["id"],
    name: json["name"] == null ? undefined : json["name"],
    org_key: json["org_key"] == null ? undefined : json["org_key"],
    org_secret: json["org_secret"] == null ? undefined : json["org_secret"],
    scope: json["scope"] == null ? undefined : json["scope"],
  };
}

export function HandlersOrgKeyCreateRespToJSON(
  json: any,
): HandlersOrgKeyCreateResp {
  return HandlersOrgKeyCreateRespToJSONTyped(json, false);
}

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

  return {
    created_at: value["created_at"],
    expires_at: value["expires_at"],
    id: value["id"],
    name: value["name"],
    org_key: value["org_key"],
    org_secret: value["org_secret"],
    scope: value["scope"],
  };
}
