/* 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 { ImageType } from './ImageType';
import {
    ImageTypeFromJSON,
    ImageTypeFromJSONTyped,
    ImageTypeToJSON,
} from './ImageType';

/**
 * 
 * @export
 * @interface ImageOption
 */
export interface ImageOption {
    /**
     * 
     * @type {ImageType}
     * @memberof ImageOption
     */
    type?: ImageType;
    /**
     * Gets or sets the limit.
     * @type {number}
     * @memberof ImageOption
     */
    limit?: number;
    /**
     * Gets or sets the minimum width.
     * @type {number}
     * @memberof ImageOption
     */
    minWidth?: number;
}

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

    return isInstance;
}

export function ImageOptionFromJSON(json: any): ImageOption {
    return ImageOptionFromJSONTyped(json, false);
}

export function ImageOptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageOption {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'type': !exists(json, 'Type') ? undefined : ImageTypeFromJSON(json['Type']),
        'limit': !exists(json, 'Limit') ? undefined : json['Limit'],
        'minWidth': !exists(json, 'MinWidth') ? undefined : json['MinWidth'],
    };
}

export function ImageOptionToJSON(value?: ImageOption | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'Type': ImageTypeToJSON(value.type),
        'Limit': value.limit,
        'MinWidth': value.minWidth,
    };
}

