/* 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';
/**
 * Details about the supported streaming types for a service-country combo.
 * @export
 * @interface SupportedStreamingTypes
 */
export interface SupportedStreamingTypes {
    /**
     * Whether there are addons/channels available.
     * @type {boolean}
     * @memberof SupportedStreamingTypes
     */
    addon: boolean;
    /**
     * Whether buying shows is supported.
     * @type {boolean}
     * @memberof SupportedStreamingTypes
     */
    buy: boolean;
    /**
     * Whether renting shows is supported.
     * @type {boolean}
     * @memberof SupportedStreamingTypes
     */
    rent: boolean;
    /**
     * Whether there are free shows available.
     * @type {boolean}
     * @memberof SupportedStreamingTypes
     */
    free: boolean;
    /**
     * Whether signing up for a subscription plan is available.
     * @type {boolean}
     * @memberof SupportedStreamingTypes
     */
    subscription: boolean;
}

/**
 * Check if a given object implements the SupportedStreamingTypes interface.
 */
export function instanceOfSupportedStreamingTypes(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "addon" in value;
    isInstance = isInstance && "buy" in value;
    isInstance = isInstance && "rent" in value;
    isInstance = isInstance && "free" in value;
    isInstance = isInstance && "subscription" in value;

    return isInstance;
}

export function SupportedStreamingTypesFromJSON(json: any): SupportedStreamingTypes {
    return SupportedStreamingTypesFromJSONTyped(json, false);
}

export function SupportedStreamingTypesFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupportedStreamingTypes {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'addon': json['addon'],
        'buy': json['buy'],
        'rent': json['rent'],
        'free': json['free'],
        'subscription': json['subscription'],
    };
}

export function SupportedStreamingTypesToJSON(value?: SupportedStreamingTypes | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'addon': value.addon,
        'buy': value.buy,
        'rent': value.rent,
        'free': value.free,
        'subscription': value.subscription,
    };
}

