UNPKG

streaming-availability

Version:

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!

83 lines (72 loc) 2.4 kB
/* 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 { ServiceCountryInfo } from './ServiceCountryInfo'; import { ServiceCountryInfoFromJSON, ServiceCountryInfoFromJSONTyped, ServiceCountryInfoToJSON, } from './ServiceCountryInfo'; /** * Details of a service. * @export * @interface DeprecatedServiceInfo */ export interface DeprecatedServiceInfo { /** * Id of the service. * @type {string} * @memberof DeprecatedServiceInfo */ id: string; /** * Map of 2-letter country ISO code to details of the service in that country. * @type {{ [key: string]: ServiceCountryInfo; }} * @memberof DeprecatedServiceInfo */ countries: { [key: string]: ServiceCountryInfo; }; } /** * Check if a given object implements the DeprecatedServiceInfo interface. */ export function instanceOfDeprecatedServiceInfo(value: object): boolean { let isInstance = true; isInstance = isInstance && "id" in value; isInstance = isInstance && "countries" in value; return isInstance; } export function DeprecatedServiceInfoFromJSON(json: any): DeprecatedServiceInfo { return DeprecatedServiceInfoFromJSONTyped(json, false); } export function DeprecatedServiceInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeprecatedServiceInfo { if ((json === undefined) || (json === null)) { return json; } return { 'id': json['id'], 'countries': (mapValues(json['countries'], ServiceCountryInfoFromJSON)), }; } export function DeprecatedServiceInfoToJSON(value?: DeprecatedServiceInfo | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'countries': (mapValues(value.countries, ServiceCountryInfoToJSON)), }; }