/* 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';
/**
 * A language and optionally an associated region.
 * @export
 * @interface Locale
 */
export interface Locale {
    /**
     * [ISO 639-2](https://en.wikipedia.org/wiki/ISO_639-2) code of the associated language with the locale.
     * @type {string}
     * @memberof Locale
     */
    language: string;
    /**
     * [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code of the country,
     * or [UN M49](https://en.wikipedia.org/wiki/UN_M49) code of the area associated with the locale.
     * 
     * @type {string}
     * @memberof Locale
     */
    region?: string;
}

/**
 * Check if a given object implements the Locale interface.
 */
export function instanceOfLocale(value: object): boolean {
    if (!('language' in value)) return false;
    return true;
}

export function LocaleFromJSON(json: any): Locale {
    return LocaleFromJSONTyped(json, false);
}

export function LocaleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Locale {
    if (json == null) {
        return json;
    }
    return {
        
        'language': json['language'],
        'region': json['region'] == null ? undefined : json['region'],
    };
}

export function LocaleToJSON(value?: Locale | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'language': value['language'],
        'region': value['region'],
    };
}

