cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
156 lines (147 loc) • 4.4 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 {
BaseRatingMetadata,
BaseRatingMetadataFromJSON,
BaseRatingMetadataFromJSONTyped,
BaseRatingMetadataToJSON,
} from './BaseRatingMetadata';
import {
VerticalDatumInfo,
VerticalDatumInfoFromJSON,
VerticalDatumInfoFromJSONTyped,
VerticalDatumInfoToJSON,
} from './VerticalDatumInfo';
import {
VirtualRatingAllOf,
VirtualRatingAllOfFromJSON,
VirtualRatingAllOfFromJSONTyped,
VirtualRatingAllOfToJSON,
} from './VirtualRatingAllOf';
/**
*
* @export
* @interface VirtualRating
*/
export interface VirtualRating {
/**
*
* @type {string}
* @memberof VirtualRating
*/
officeId?: string;
/**
*
* @type {string}
* @memberof VirtualRating
*/
ratingSpecId?: string;
/**
*
* @type {string}
* @memberof VirtualRating
*/
unitsId?: string;
/**
*
* @type {boolean}
* @memberof VirtualRating
*/
active?: boolean;
/**
*
* @type {Date}
* @memberof VirtualRating
*/
effectiveDate?: Date;
/**
*
* @type {Date}
* @memberof VirtualRating
*/
createDate?: Date;
/**
*
* @type {Date}
* @memberof VirtualRating
*/
transitionDate?: Date;
/**
*
* @type {string}
* @memberof VirtualRating
*/
description?: string;
/**
*
* @type {VerticalDatumInfo}
* @memberof VirtualRating
*/
verticalDatumInfo?: VerticalDatumInfo;
/**
*
* @type {Array<object>}
* @memberof VirtualRating
*/
sourceRatings?: Array<object>;
/**
*
* @type {string}
* @memberof VirtualRating
*/
connections?: string;
}
export function VirtualRatingFromJSON(json: any): VirtualRating {
return VirtualRatingFromJSONTyped(json, false);
}
export function VirtualRatingFromJSONTyped(json: any, ignoreDiscriminator: boolean): VirtualRating {
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']),
'sourceRatings': !exists(json, 'source-ratings') ? undefined : json['source-ratings'],
'connections': !exists(json, 'connections') ? undefined : json['connections'],
};
}
export function VirtualRatingToJSON(value?: VirtualRating | 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),
'source-ratings': value.sourceRatings,
'connections': value.connections,
};
}