UNPKG

cwmsjs

Version:

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

192 lines (183 loc) 5.56 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 { IndependentRoundingSpec, IndependentRoundingSpecFromJSON, IndependentRoundingSpecFromJSONTyped, IndependentRoundingSpecToJSON, } from './IndependentRoundingSpec'; /** * * @export * @interface RatingSpec */ export interface RatingSpec { /** * Owning office of object. * @type {string} * @memberof RatingSpec */ officeId: string; /** * * @type {string} * @memberof RatingSpec */ ratingId?: string; /** * * @type {string} * @memberof RatingSpec */ templateId?: string; /** * * @type {string} * @memberof RatingSpec */ locationId?: string; /** * * @type {string} * @memberof RatingSpec */ version?: string; /** * * @type {string} * @memberof RatingSpec */ sourceAgency?: string; /** * * @type {string} * @memberof RatingSpec */ inRangeMethod?: string; /** * * @type {string} * @memberof RatingSpec */ outRangeLowMethod?: string; /** * * @type {string} * @memberof RatingSpec */ outRangeHighMethod?: string; /** * * @type {boolean} * @memberof RatingSpec */ active?: boolean; /** * * @type {boolean} * @memberof RatingSpec */ autoUpdate?: boolean; /** * * @type {boolean} * @memberof RatingSpec */ autoActivate?: boolean; /** * * @type {boolean} * @memberof RatingSpec */ autoMigrateExtension?: boolean; /** * * @type {Array<IndependentRoundingSpec>} * @memberof RatingSpec */ independentRoundingSpecs?: Array<IndependentRoundingSpec>; /** * * @type {string} * @memberof RatingSpec */ dependentRoundingSpec?: string; /** * * @type {string} * @memberof RatingSpec */ description?: string; /** * * @type {Array<Date>} * @memberof RatingSpec */ effectiveDates?: Array<Date>; } export function RatingSpecFromJSON(json: any): RatingSpec { return RatingSpecFromJSONTyped(json, false); } export function RatingSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): RatingSpec { if ((json === undefined) || (json === null)) { return json; } return { 'officeId': json['office-id'], 'ratingId': !exists(json, 'rating-id') ? undefined : json['rating-id'], 'templateId': !exists(json, 'template-id') ? undefined : json['template-id'], 'locationId': !exists(json, 'location-id') ? undefined : json['location-id'], 'version': !exists(json, 'version') ? undefined : json['version'], 'sourceAgency': !exists(json, 'source-agency') ? undefined : json['source-agency'], 'inRangeMethod': !exists(json, 'in-range-method') ? undefined : json['in-range-method'], 'outRangeLowMethod': !exists(json, 'out-range-low-method') ? undefined : json['out-range-low-method'], 'outRangeHighMethod': !exists(json, 'out-range-high-method') ? undefined : json['out-range-high-method'], 'active': !exists(json, 'active') ? undefined : json['active'], 'autoUpdate': !exists(json, 'auto-update') ? undefined : json['auto-update'], 'autoActivate': !exists(json, 'auto-activate') ? undefined : json['auto-activate'], 'autoMigrateExtension': !exists(json, 'auto-migrate-extension') ? undefined : json['auto-migrate-extension'], 'independentRoundingSpecs': !exists(json, 'independent-rounding-specs') ? undefined : ((json['independent-rounding-specs'] as Array<any>).map(IndependentRoundingSpecFromJSON)), 'dependentRoundingSpec': !exists(json, 'dependent-rounding-spec') ? undefined : json['dependent-rounding-spec'], 'description': !exists(json, 'description') ? undefined : json['description'], 'effectiveDates': !exists(json, 'effective-dates') ? undefined : json['effective-dates'], }; } export function RatingSpecToJSON(value?: RatingSpec | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'office-id': value.officeId, 'rating-id': value.ratingId, 'template-id': value.templateId, 'location-id': value.locationId, 'version': value.version, 'source-agency': value.sourceAgency, 'in-range-method': value.inRangeMethod, 'out-range-low-method': value.outRangeLowMethod, 'out-range-high-method': value.outRangeHighMethod, 'active': value.active, 'auto-update': value.autoUpdate, 'auto-activate': value.autoActivate, 'auto-migrate-extension': value.autoMigrateExtension, 'independent-rounding-specs': value.independentRoundingSpecs === undefined ? undefined : ((value.independentRoundingSpecs as Array<any>).map(IndependentRoundingSpecToJSON)), 'dependent-rounding-spec': value.dependentRoundingSpec, 'description': value.description, 'effective-dates': value.effectiveDates, }; }