/* tslint:disable */
/* eslint-disable */
/**
 * Jellyfin API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 10.8.9
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { exists, mapValues } from '../runtime';
/**
 * Stores the state of an quick connect request.
 * @export
 * @interface QuickConnectResult
 */
export interface QuickConnectResult {
    /**
     * Gets or sets a value indicating whether this request is authorized.
     * @type {boolean}
     * @memberof QuickConnectResult
     */
    authenticated?: boolean;
    /**
     * Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication information.
     * @type {string}
     * @memberof QuickConnectResult
     */
    secret?: string;
    /**
     * Gets the user facing code used so the user can quickly differentiate this request from others.
     * @type {string}
     * @memberof QuickConnectResult
     */
    code?: string;
    /**
     * Gets the requesting device id.
     * @type {string}
     * @memberof QuickConnectResult
     */
    deviceId?: string;
    /**
     * Gets the requesting device name.
     * @type {string}
     * @memberof QuickConnectResult
     */
    deviceName?: string;
    /**
     * Gets the requesting app name.
     * @type {string}
     * @memberof QuickConnectResult
     */
    appName?: string;
    /**
     * Gets the requesting app version.
     * @type {string}
     * @memberof QuickConnectResult
     */
    appVersion?: string;
    /**
     * Gets or sets the DateTime that this request was created.
     * @type {Date}
     * @memberof QuickConnectResult
     */
    dateAdded?: Date;
}

/**
 * Check if a given object implements the QuickConnectResult interface.
 */
export function instanceOfQuickConnectResult(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function QuickConnectResultFromJSON(json: any): QuickConnectResult {
    return QuickConnectResultFromJSONTyped(json, false);
}

export function QuickConnectResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): QuickConnectResult {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'authenticated': !exists(json, 'Authenticated') ? undefined : json['Authenticated'],
        'secret': !exists(json, 'Secret') ? undefined : json['Secret'],
        'code': !exists(json, 'Code') ? undefined : json['Code'],
        'deviceId': !exists(json, 'DeviceId') ? undefined : json['DeviceId'],
        'deviceName': !exists(json, 'DeviceName') ? undefined : json['DeviceName'],
        'appName': !exists(json, 'AppName') ? undefined : json['AppName'],
        'appVersion': !exists(json, 'AppVersion') ? undefined : json['AppVersion'],
        'dateAdded': !exists(json, 'DateAdded') ? undefined : (new Date(json['DateAdded'])),
    };
}

export function QuickConnectResultToJSON(value?: QuickConnectResult | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'Authenticated': value.authenticated,
        'Secret': value.secret,
        'Code': value.code,
        'DeviceId': value.deviceId,
        'DeviceName': value.deviceName,
        'AppName': value.appName,
        'AppVersion': value.appVersion,
        'DateAdded': value.dateAdded === undefined ? undefined : (value.dateAdded.toISOString()),
    };
}

