cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
80 lines (71 loc) • 1.87 kB
text/typescript
/* 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 {
Guid,
GuidFromJSON,
GuidFromJSONTyped,
GuidToJSON,
} from './Guid';
/**
* List of RSS items in the channel
* @export
* @interface RssItem
*/
export interface RssItem {
/**
* Description of the RSS item content
* @type {string}
* @memberof RssItem
*/
description?: string;
/**
* Publication date and time of the RSS item
* @type {Date}
* @memberof RssItem
*/
pubDate?: Date;
/**
*
* @type {Guid}
* @memberof RssItem
*/
guid?: Guid;
}
export function RssItemFromJSON(json: any): RssItem {
return RssItemFromJSONTyped(json, false);
}
export function RssItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): RssItem {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'description': !exists(json, 'description') ? undefined : json['description'],
'pubDate': !exists(json, 'pubDate') ? undefined : (new Date(json['pubDate'])),
'guid': !exists(json, 'guid') ? undefined : GuidFromJSON(json['guid']),
};
}
export function RssItemToJSON(value?: RssItem | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'description': value.description,
'pubDate': value.pubDate === undefined ? undefined : (value.pubDate.toISOString()),
'guid': GuidToJSON(value.guid),
};
}