/* 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';
import type { PluginStatus } from './PluginStatus';
import {
    PluginStatusFromJSON,
    PluginStatusFromJSONTyped,
    PluginStatusToJSON,
} from './PluginStatus';

/**
 * This is a serializable stub class that is used by the api to provide information about installed plugins.
 * @export
 * @interface PluginInfo
 */
export interface PluginInfo {
    /**
     * Gets or sets the name.
     * @type {string}
     * @memberof PluginInfo
     */
    name?: string;
    /**
     * Gets or sets the version.
     * @type {string}
     * @memberof PluginInfo
     */
    version?: string;
    /**
     * Gets or sets the name of the configuration file.
     * @type {string}
     * @memberof PluginInfo
     */
    configurationFileName?: string | null;
    /**
     * Gets or sets the description.
     * @type {string}
     * @memberof PluginInfo
     */
    description?: string;
    /**
     * Gets or sets the unique id.
     * @type {string}
     * @memberof PluginInfo
     */
    id?: string;
    /**
     * Gets or sets a value indicating whether the plugin can be uninstalled.
     * @type {boolean}
     * @memberof PluginInfo
     */
    canUninstall?: boolean;
    /**
     * Gets or sets a value indicating whether this plugin has a valid image.
     * @type {boolean}
     * @memberof PluginInfo
     */
    hasImage?: boolean;
    /**
     * 
     * @type {PluginStatus}
     * @memberof PluginInfo
     */
    status?: PluginStatus;
}

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

    return isInstance;
}

export function PluginInfoFromJSON(json: any): PluginInfo {
    return PluginInfoFromJSONTyped(json, false);
}

export function PluginInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginInfo {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'name': !exists(json, 'Name') ? undefined : json['Name'],
        'version': !exists(json, 'Version') ? undefined : json['Version'],
        'configurationFileName': !exists(json, 'ConfigurationFileName') ? undefined : json['ConfigurationFileName'],
        'description': !exists(json, 'Description') ? undefined : json['Description'],
        'id': !exists(json, 'Id') ? undefined : json['Id'],
        'canUninstall': !exists(json, 'CanUninstall') ? undefined : json['CanUninstall'],
        'hasImage': !exists(json, 'HasImage') ? undefined : json['HasImage'],
        'status': !exists(json, 'Status') ? undefined : PluginStatusFromJSON(json['Status']),
    };
}

export function PluginInfoToJSON(value?: PluginInfo | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'Name': value.name,
        'Version': value.version,
        'ConfigurationFileName': value.configurationFileName,
        'Description': value.description,
        'Id': value.id,
        'CanUninstall': value.canUninstall,
        'HasImage': value.hasImage,
        'Status': PluginStatusToJSON(value.status),
    };
}

