UNPKG

cwmsjs

Version:

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

128 lines (119 loc) 3.67 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 { VerticalDatumInfo, VerticalDatumInfoFromJSON, VerticalDatumInfoFromJSONTyped, VerticalDatumInfoToJSON, } from './VerticalDatumInfo'; /** * * @export * @interface BaseRatingMetadata */ export interface BaseRatingMetadata { /** * * @type {string} * @memberof BaseRatingMetadata */ officeId?: string; /** * * @type {string} * @memberof BaseRatingMetadata */ ratingSpecId?: string; /** * * @type {string} * @memberof BaseRatingMetadata */ unitsId?: string; /** * * @type {boolean} * @memberof BaseRatingMetadata */ active?: boolean; /** * * @type {Date} * @memberof BaseRatingMetadata */ effectiveDate?: Date; /** * * @type {Date} * @memberof BaseRatingMetadata */ createDate?: Date; /** * * @type {Date} * @memberof BaseRatingMetadata */ transitionDate?: Date; /** * * @type {string} * @memberof BaseRatingMetadata */ description?: string; /** * * @type {VerticalDatumInfo} * @memberof BaseRatingMetadata */ verticalDatumInfo?: VerticalDatumInfo; } export function BaseRatingMetadataFromJSON(json: any): BaseRatingMetadata { return BaseRatingMetadataFromJSONTyped(json, false); } export function BaseRatingMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BaseRatingMetadata { if ((json === undefined) || (json === null)) { return json; } return { 'officeId': !exists(json, 'office-id') ? undefined : json['office-id'], 'ratingSpecId': !exists(json, 'rating-spec-id') ? undefined : json['rating-spec-id'], 'unitsId': !exists(json, 'units-id') ? undefined : json['units-id'], 'active': !exists(json, 'active') ? undefined : json['active'], 'effectiveDate': !exists(json, 'effective-date') ? undefined : (new Date(json['effective-date'])), 'createDate': !exists(json, 'create-date') ? undefined : (new Date(json['create-date'])), 'transitionDate': !exists(json, 'transition-date') ? undefined : (new Date(json['transition-date'])), 'description': !exists(json, 'description') ? undefined : json['description'], 'verticalDatumInfo': !exists(json, 'vertical-datum-info') ? undefined : VerticalDatumInfoFromJSON(json['vertical-datum-info']), }; } export function BaseRatingMetadataToJSON(value?: BaseRatingMetadata | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'office-id': value.officeId, 'rating-spec-id': value.ratingSpecId, 'units-id': value.unitsId, 'active': value.active, 'effective-date': value.effectiveDate === undefined ? undefined : (value.effectiveDate.toISOString()), 'create-date': value.createDate === undefined ? undefined : (value.createDate.toISOString()), 'transition-date': value.transitionDate === undefined ? undefined : (value.transitionDate.toISOString()), 'description': value.description, 'vertical-datum-info': VerticalDatumInfoToJSON(value.verticalDatumInfo), }; }