UNPKG

cwmsjs

Version:

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

92 lines (82 loc) 2.42 kB
/* tslint:disable */ /* eslint-disable */ /** * CWMS Data API * CWMS REST API for Data Retrieval * * The version of the OpenAPI document: 2.3.2-2025.03.19 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { CwmsId } from './CwmsId'; import { CwmsIdFromJSON, CwmsIdFromJSONTyped, CwmsIdToJSON, } from './CwmsId'; import type { VirtualOutletRecord } from './VirtualOutletRecord'; import { VirtualOutletRecordFromJSON, VirtualOutletRecordFromJSONTyped, VirtualOutletRecordToJSON, } from './VirtualOutletRecord'; /** * * @export * @interface VirtualOutlet */ export interface VirtualOutlet { /** * * @type {CwmsId} * @memberof VirtualOutlet */ projectId: CwmsId; /** * * @type {CwmsId} * @memberof VirtualOutlet */ virtualOutletId: CwmsId; /** * * @type {Array<VirtualOutletRecord>} * @memberof VirtualOutlet */ virtualRecords?: Array<VirtualOutletRecord>; } /** * Check if a given object implements the VirtualOutlet interface. */ export function instanceOfVirtualOutlet(value: object): boolean { if (!('projectId' in value)) return false; if (!('virtualOutletId' in value)) return false; return true; } export function VirtualOutletFromJSON(json: any): VirtualOutlet { return VirtualOutletFromJSONTyped(json, false); } export function VirtualOutletFromJSONTyped(json: any, ignoreDiscriminator: boolean): VirtualOutlet { if (json == null) { return json; } return { 'projectId': CwmsIdFromJSON(json['project-id']), 'virtualOutletId': CwmsIdFromJSON(json['virtual-outlet-id']), 'virtualRecords': json['virtual-records'] == null ? undefined : ((json['virtual-records'] as Array<any>).map(VirtualOutletRecordFromJSON)), }; } export function VirtualOutletToJSON(value?: VirtualOutlet | null): any { if (value == null) { return value; } return { 'project-id': CwmsIdToJSON(value['projectId']), 'virtual-outlet-id': CwmsIdToJSON(value['virtualOutletId']), 'virtual-records': value['virtualRecords'] == null ? undefined : ((value['virtualRecords'] as Array<any>).map(VirtualOutletRecordToJSON)), }; }