/* tslint:disable */
/* eslint-disable */
/**
 * elkar-app
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.1.0
 * 
 *
 * 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 CreateApiKeyInput
 */
export interface CreateApiKeyInput {
    /**
     * 
     * @type {string}
     * @memberof CreateApiKeyInput
     */
    agentId?: string | null;
    /**
     * 
     * @type {number}
     * @memberof CreateApiKeyInput
     */
    expiresIn?: number | null;
    /**
     * 
     * @type {string}
     * @memberof CreateApiKeyInput
     */
    name: string;
}

/**
 * Check if a given object implements the CreateApiKeyInput interface.
 */
export function instanceOfCreateApiKeyInput(value: object): value is CreateApiKeyInput {
    if (!('name' in value) || value['name'] === undefined) return false;
    return true;
}

export function CreateApiKeyInputFromJSON(json: any): CreateApiKeyInput {
    return CreateApiKeyInputFromJSONTyped(json, false);
}

export function CreateApiKeyInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateApiKeyInput {
    if (json == null) {
        return json;
    }
    return {
        
        'agentId': json['agent_id'] == null ? undefined : json['agent_id'],
        'expiresIn': json['expires_in'] == null ? undefined : json['expires_in'],
        'name': json['name'],
    };
}

export function CreateApiKeyInputToJSON(json: any): CreateApiKeyInput {
    return CreateApiKeyInputToJSONTyped(json, false);
}

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

    return {
        
        'agent_id': value['agentId'],
        'expires_in': value['expiresIn'],
        'name': value['name'],
    };
}

