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!
73 lines (72 loc) • 2.44 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.SeasonToJSON = exports.SeasonFromJSONTyped = exports.SeasonFromJSON = exports.instanceOfSeason = exports.SeasonTypeEnum = void 0;
var Episode_1 = require("./Episode");
/**
* @export
*/
exports.SeasonTypeEnum = {
Season: 'season'
};
/**
* Check if a given object implements the Season interface.
*/
function instanceOfSeason(value) {
var isInstance = true;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "title" in value;
isInstance = isInstance && "firstAirYear" in value;
isInstance = isInstance && "lastAirYear" in value;
isInstance = isInstance && "streamingInfo" in value;
isInstance = isInstance && "episodes" in value;
return isInstance;
}
exports.instanceOfSeason = instanceOfSeason;
function SeasonFromJSON(json) {
return SeasonFromJSONTyped(json, false);
}
exports.SeasonFromJSON = SeasonFromJSON;
function SeasonFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'type': json['type'],
'title': json['title'],
'firstAirYear': json['firstAirYear'],
'lastAirYear': json['lastAirYear'],
'streamingInfo': json['streamingInfo'],
'episodes': (json['episodes'].map(Episode_1.EpisodeFromJSON)),
};
}
exports.SeasonFromJSONTyped = SeasonFromJSONTyped;
function SeasonToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'type': value.type,
'title': value.title,
'firstAirYear': value.firstAirYear,
'lastAirYear': value.lastAirYear,
'streamingInfo': value.streamingInfo,
'episodes': (value.episodes.map(Episode_1.EpisodeToJSON)),
};
}
exports.SeasonToJSON = SeasonToJSON;