UNPKG

cwmsjs

Version:

CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps

94 lines (85 loc) 2.27 kB
/* tslint:disable */ /* eslint-disable */ /** * CWMS Data API * CWMS REST API for Data Retrieval * * The version of the OpenAPI document: 2.4.0-2026.3.16 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import { AtomLink, AtomLinkFromJSON, AtomLinkFromJSONTyped, AtomLinkToJSON, } from './AtomLink'; import { RssItem, RssItemFromJSON, RssItemFromJSONTyped, RssItemToJSON, } from './RssItem'; /** * The RSS channel containing feed metadata and items * @export * @interface RssChannel */ export interface RssChannel { /** * Title of the RSS channel * @type {string} * @memberof RssChannel */ title: string; /** * * @type {AtomLink} * @memberof RssChannel */ nextLink?: AtomLink; /** * Description of the RSS channel * @type {string} * @memberof RssChannel */ description: string; /** * List of RSS items in the channel * @type {Array<RssItem>} * @memberof RssChannel */ items?: Array<RssItem>; } export function RssChannelFromJSON(json: any): RssChannel { return RssChannelFromJSONTyped(json, false); } export function RssChannelFromJSONTyped(json: any, ignoreDiscriminator: boolean): RssChannel { if ((json === undefined) || (json === null)) { return json; } return { 'title': json['title'], 'nextLink': !exists(json, 'nextLink') ? undefined : AtomLinkFromJSON(json['nextLink']), 'description': json['description'], 'items': !exists(json, 'items') ? undefined : ((json['items'] as Array<any>).map(RssItemFromJSON)), }; } export function RssChannelToJSON(value?: RssChannel | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'title': value.title, 'nextLink': AtomLinkToJSON(value.nextLink), 'description': value.description, 'items': value.items === undefined ? undefined : ((value.items as Array<any>).map(RssItemToJSON)), }; }