/* 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 60 countries!
 *
 * The version of the OpenAPI document: 4.1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from '../runtime';
import type { Locale } from './Locale';
import {
    LocaleFromJSON,
    LocaleFromJSONTyped,
    LocaleToJSON,
} from './Locale';

/**
 * 
 * @export
 * @interface Subtitle
 */
export interface Subtitle {
    /**
     * Whether closed captions are available for the subtitle.
     * @type {boolean}
     * @memberof Subtitle
     */
    closedCaptions: boolean;
    /**
     * 
     * @type {Locale}
     * @memberof Subtitle
     */
    locale: Locale;
}

/**
 * Check if a given object implements the Subtitle interface.
 */
export function instanceOfSubtitle(value: object): boolean {
    if (!('closedCaptions' in value)) return false;
    if (!('locale' in value)) return false;
    return true;
}

export function SubtitleFromJSON(json: any): Subtitle {
    return SubtitleFromJSONTyped(json, false);
}

export function SubtitleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Subtitle {
    if (json == null) {
        return json;
    }
    return {
        
        'closedCaptions': json['closedCaptions'],
        'locale': LocaleFromJSON(json['locale']),
    };
}

export function SubtitleToJSON(value?: Subtitle | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'closedCaptions': value['closedCaptions'],
        'locale': LocaleToJSON(value['locale']),
    };
}

