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!

56 lines (55 loc) 2.21 kB
"use strict"; /* 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DeprecatedServiceInfoToJSON = exports.DeprecatedServiceInfoFromJSONTyped = exports.DeprecatedServiceInfoFromJSON = exports.instanceOfDeprecatedServiceInfo = void 0; var runtime_1 = require("../runtime"); var ServiceCountryInfo_1 = require("./ServiceCountryInfo"); /** * Check if a given object implements the DeprecatedServiceInfo interface. */ function instanceOfDeprecatedServiceInfo(value) { var isInstance = true; isInstance = isInstance && "id" in value; isInstance = isInstance && "countries" in value; return isInstance; } exports.instanceOfDeprecatedServiceInfo = instanceOfDeprecatedServiceInfo; function DeprecatedServiceInfoFromJSON(json) { return DeprecatedServiceInfoFromJSONTyped(json, false); } exports.DeprecatedServiceInfoFromJSON = DeprecatedServiceInfoFromJSON; function DeprecatedServiceInfoFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'id': json['id'], 'countries': ((0, runtime_1.mapValues)(json['countries'], ServiceCountryInfo_1.ServiceCountryInfoFromJSON)), }; } exports.DeprecatedServiceInfoFromJSONTyped = DeprecatedServiceInfoFromJSONTyped; function DeprecatedServiceInfoToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'countries': ((0, runtime_1.mapValues)(value.countries, ServiceCountryInfo_1.ServiceCountryInfoToJSON)), }; } exports.DeprecatedServiceInfoToJSON = DeprecatedServiceInfoToJSON;