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!
59 lines (58 loc) • 2.03 kB
JavaScript
;
/* 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.CountryToJSON = exports.CountryFromJSONTyped = exports.CountryFromJSON = exports.instanceOfCountry = void 0;
var runtime_1 = require("../runtime");
var Service_1 = require("./Service");
/**
* Check if a given object implements the Country interface.
*/
function instanceOfCountry(value) {
var isInstance = true;
isInstance = isInstance && "countryCode" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "services" in value;
return isInstance;
}
exports.instanceOfCountry = instanceOfCountry;
function CountryFromJSON(json) {
return CountryFromJSONTyped(json, false);
}
exports.CountryFromJSON = CountryFromJSON;
function CountryFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'countryCode': json['countryCode'],
'name': json['name'],
'services': ((0, runtime_1.mapValues)(json['services'], Service_1.ServiceFromJSON)),
};
}
exports.CountryFromJSONTyped = CountryFromJSONTyped;
function CountryToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'countryCode': value.countryCode,
'name': value.name,
'services': ((0, runtime_1.mapValues)(value.services, Service_1.ServiceToJSON)),
};
}
exports.CountryToJSON = CountryToJSON;