/* tslint:disable */
/* eslint-disable */
/**
 * Streaming Availability API
 * Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries!
 *
 * The version of the OpenAPI document: 3.3.1
 * 
 *
 * 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 { ImageSet } from './ImageSet';
import {
    ImageSetFromJSON,
    ImageSetFromJSONTyped,
    ImageSetToJSON,
} from './ImageSet';

/**
 * Details of an addon.
 * @export
 * @interface Addon
 */
export interface Addon {
    /**
     * Id of the addon.
     * @type {string}
     * @memberof Addon
     */
    id: string;
    /**
     * Name of the addon.
     * @type {string}
     * @memberof Addon
     */
    displayName: string;
    /**
     * Link to the homepage of the addon.
     * @type {string}
     * @memberof Addon
     */
    homePage: string;
    /**
     * Associated theme color hex code of the addon.
     * @type {string}
     * @memberof Addon
     */
    themeColorCode: string;
    /**
     * Link to the logo of the addon. Deprecated, use "images" instead.
     * @type {string}
     * @memberof Addon
     * @deprecated
     */
    image: string;
    /**
     * 
     * @type {ImageSet}
     * @memberof Addon
     */
    images: ImageSet;
}

/**
 * Check if a given object implements the Addon interface.
 */
export function instanceOfAddon(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "id" in value;
    isInstance = isInstance && "displayName" in value;
    isInstance = isInstance && "homePage" in value;
    isInstance = isInstance && "themeColorCode" in value;
    isInstance = isInstance && "image" in value;
    isInstance = isInstance && "images" in value;

    return isInstance;
}

export function AddonFromJSON(json: any): Addon {
    return AddonFromJSONTyped(json, false);
}

export function AddonFromJSONTyped(json: any, ignoreDiscriminator: boolean): Addon {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'id': json['id'],
        'displayName': json['displayName'],
        'homePage': json['homePage'],
        'themeColorCode': json['themeColorCode'],
        'image': json['image'],
        'images': ImageSetFromJSON(json['images']),
    };
}

export function AddonToJSON(value?: Addon | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'id': value.id,
        'displayName': value.displayName,
        'homePage': value.homePage,
        'themeColorCode': value.themeColorCode,
        'image': value.image,
        'images': ImageSetToJSON(value.images),
    };
}

