cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
148 lines (139 loc) • 4.2 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 {
ExpressionRatingAllOf,
ExpressionRatingAllOfFromJSON,
ExpressionRatingAllOfFromJSONTyped,
ExpressionRatingAllOfToJSON,
} from './ExpressionRatingAllOf';
import {
VerticalDatumInfo,
VerticalDatumInfoFromJSON,
VerticalDatumInfoFromJSONTyped,
VerticalDatumInfoToJSON,
} from './VerticalDatumInfo';
/**
*
* @export
* @interface ExpressionRating
*/
export interface ExpressionRating {
/**
*
* @type {string}
* @memberof ExpressionRating
*/
officeId?: string;
/**
*
* @type {string}
* @memberof ExpressionRating
*/
ratingSpecId?: string;
/**
*
* @type {string}
* @memberof ExpressionRating
*/
unitsId?: string;
/**
*
* @type {boolean}
* @memberof ExpressionRating
*/
active?: boolean;
/**
*
* @type {Date}
* @memberof ExpressionRating
*/
effectiveDate?: Date;
/**
*
* @type {Date}
* @memberof ExpressionRating
*/
createDate?: Date;
/**
*
* @type {Date}
* @memberof ExpressionRating
*/
transitionDate?: Date;
/**
*
* @type {string}
* @memberof ExpressionRating
*/
description?: string;
/**
*
* @type {VerticalDatumInfo}
* @memberof ExpressionRating
*/
verticalDatumInfo?: VerticalDatumInfo;
/**
*
* @type {string}
* @memberof ExpressionRating
*/
expression?: string;
}
export function ExpressionRatingFromJSON(json: any): ExpressionRating {
return ExpressionRatingFromJSONTyped(json, false);
}
export function ExpressionRatingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpressionRating {
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']),
'expression': !exists(json, 'expression') ? undefined : json['expression'],
};
}
export function ExpressionRatingToJSON(value?: ExpressionRating | 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),
'expression': value.expression,
};
}