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 60 countries!
75 lines (74 loc) • 2.71 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 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceToJSON = exports.ServiceFromJSONTyped = exports.ServiceFromJSON = exports.instanceOfService = void 0;
var Addon_1 = require("./Addon");
var ServiceImageSet_1 = require("./ServiceImageSet");
var StreamingOptionTypes_1 = require("./StreamingOptionTypes");
/**
* Check if a given object implements the Service interface.
*/
function instanceOfService(value) {
if (!('id' in value))
return false;
if (!('name' in value))
return false;
if (!('homePage' in value))
return false;
if (!('themeColorCode' in value))
return false;
if (!('imageSet' in value))
return false;
if (!('streamingOptionTypes' in value))
return false;
if (!('addons' in value))
return false;
return true;
}
exports.instanceOfService = instanceOfService;
function ServiceFromJSON(json) {
return ServiceFromJSONTyped(json, false);
}
exports.ServiceFromJSON = ServiceFromJSON;
function ServiceFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'homePage': json['homePage'],
'themeColorCode': json['themeColorCode'],
'imageSet': (0, ServiceImageSet_1.ServiceImageSetFromJSON)(json['imageSet']),
'streamingOptionTypes': (0, StreamingOptionTypes_1.StreamingOptionTypesFromJSON)(json['streamingOptionTypes']),
'addons': (json['addons'].map(Addon_1.AddonFromJSON)),
};
}
exports.ServiceFromJSONTyped = ServiceFromJSONTyped;
function ServiceToJSON(value) {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'homePage': value['homePage'],
'themeColorCode': value['themeColorCode'],
'imageSet': (0, ServiceImageSet_1.ServiceImageSetToJSON)(value['imageSet']),
'streamingOptionTypes': (0, StreamingOptionTypes_1.StreamingOptionTypesToJSON)(value['streamingOptionTypes']),
'addons': (value['addons'].map(Addon_1.AddonToJSON)),
};
}
exports.ServiceToJSON = ServiceToJSON;