UNPKG

cwmsjs

Version:

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

118 lines (108 loc) 3.02 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 { StreamLocationNode } from './StreamLocationNode'; import { StreamLocationNodeFromJSON, StreamLocationNodeFromJSONTyped, StreamLocationNodeToJSON, } from './StreamLocationNode'; /** * * @export * @interface StreamReach */ export interface StreamReach { /** * * @type {string} * @memberof StreamReach */ comment?: string; /** * * @type {StreamLocationNode} * @memberof StreamReach */ downstreamNode: StreamLocationNode; /** * * @type {StreamLocationNode} * @memberof StreamReach */ upstreamNode: StreamLocationNode; /** * * @type {CwmsId} * @memberof StreamReach */ configurationId?: CwmsId; /** * * @type {CwmsId} * @memberof StreamReach */ streamId: CwmsId; /** * * @type {CwmsId} * @memberof StreamReach */ id: CwmsId; } /** * Check if a given object implements the StreamReach interface. */ export function instanceOfStreamReach(value: object): boolean { if (!('downstreamNode' in value)) return false; if (!('upstreamNode' in value)) return false; if (!('streamId' in value)) return false; if (!('id' in value)) return false; return true; } export function StreamReachFromJSON(json: any): StreamReach { return StreamReachFromJSONTyped(json, false); } export function StreamReachFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamReach { if (json == null) { return json; } return { 'comment': json['comment'] == null ? undefined : json['comment'], 'downstreamNode': StreamLocationNodeFromJSON(json['downstream-node']), 'upstreamNode': StreamLocationNodeFromJSON(json['upstream-node']), 'configurationId': json['configuration-id'] == null ? undefined : CwmsIdFromJSON(json['configuration-id']), 'streamId': CwmsIdFromJSON(json['stream-id']), 'id': CwmsIdFromJSON(json['id']), }; } export function StreamReachToJSON(value?: StreamReach | null): any { if (value == null) { return value; } return { 'comment': value['comment'], 'downstream-node': StreamLocationNodeToJSON(value['downstreamNode']), 'upstream-node': StreamLocationNodeToJSON(value['upstreamNode']), 'configuration-id': CwmsIdToJSON(value['configurationId']), 'stream-id': CwmsIdToJSON(value['streamId']), 'id': CwmsIdToJSON(value['id']), }; }