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!
84 lines (83 loc) • 3.42 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.ChangeToJSON = exports.ChangeFromJSONTyped = exports.ChangeFromJSON = exports.instanceOfChange = void 0;
var Addon_1 = require("./Addon");
var ChangeType_1 = require("./ChangeType");
var ItemType_1 = require("./ItemType");
var ServiceInfo_1 = require("./ServiceInfo");
var ShowType_1 = require("./ShowType");
var StreamingOptionType_1 = require("./StreamingOptionType");
/**
* Check if a given object implements the Change interface.
*/
function instanceOfChange(value) {
if (!('changeType' in value))
return false;
if (!('itemType' in value))
return false;
if (!('showId' in value))
return false;
if (!('showType' in value))
return false;
if (!('service' in value))
return false;
if (!('streamingOptionType' in value))
return false;
return true;
}
exports.instanceOfChange = instanceOfChange;
function ChangeFromJSON(json) {
return ChangeFromJSONTyped(json, false);
}
exports.ChangeFromJSON = ChangeFromJSON;
function ChangeFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'changeType': (0, ChangeType_1.ChangeTypeFromJSON)(json['changeType']),
'itemType': (0, ItemType_1.ItemTypeFromJSON)(json['itemType']),
'showId': json['showId'],
'showType': (0, ShowType_1.ShowTypeFromJSON)(json['showType']),
'season': json['season'] == null ? undefined : json['season'],
'episode': json['episode'] == null ? undefined : json['episode'],
'service': (0, ServiceInfo_1.ServiceInfoFromJSON)(json['service']),
'streamingOptionType': (0, StreamingOptionType_1.StreamingOptionTypeFromJSON)(json['streamingOptionType']),
'addon': json['addon'] == null ? undefined : (0, Addon_1.AddonFromJSON)(json['addon']),
'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
'link': json['link'] == null ? undefined : json['link'],
};
}
exports.ChangeFromJSONTyped = ChangeFromJSONTyped;
function ChangeToJSON(value) {
if (value == null) {
return value;
}
return {
'changeType': (0, ChangeType_1.ChangeTypeToJSON)(value['changeType']),
'itemType': (0, ItemType_1.ItemTypeToJSON)(value['itemType']),
'showId': value['showId'],
'showType': (0, ShowType_1.ShowTypeToJSON)(value['showType']),
'season': value['season'],
'episode': value['episode'],
'service': (0, ServiceInfo_1.ServiceInfoToJSON)(value['service']),
'streamingOptionType': (0, StreamingOptionType_1.StreamingOptionTypeToJSON)(value['streamingOptionType']),
'addon': (0, Addon_1.AddonToJSON)(value['addon']),
'timestamp': value['timestamp'],
'link': value['link'],
};
}
exports.ChangeToJSON = ChangeToJSON;