/* 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 { StreamLocationNode } from './StreamLocationNode';
import {
    StreamLocationNodeFromJSON,
    StreamLocationNodeFromJSONTyped,
    StreamLocationNodeToJSON,
} from './StreamLocationNode';

/**
 * 
 * @export
 * @interface StreamLocation
 */
export interface StreamLocation {
    /**
     * 
     * @type {StreamLocationNode}
     * @memberof StreamLocation
     */
    streamLocationNode: StreamLocationNode;
    /**
     * 
     * @type {number}
     * @memberof StreamLocation
     */
    publishedStation?: number;
    /**
     * 
     * @type {number}
     * @memberof StreamLocation
     */
    navigationStation?: number;
    /**
     * 
     * @type {number}
     * @memberof StreamLocation
     */
    lowestMeasurableStage?: number;
    /**
     * 
     * @type {number}
     * @memberof StreamLocation
     */
    totalDrainageArea?: number;
    /**
     * 
     * @type {number}
     * @memberof StreamLocation
     */
    ungagedDrainageArea?: number;
    /**
     * 
     * @type {string}
     * @memberof StreamLocation
     */
    areaUnits?: string;
    /**
     * 
     * @type {string}
     * @memberof StreamLocation
     */
    stageUnits?: string;
}

/**
 * Check if a given object implements the StreamLocation interface.
 */
export function instanceOfStreamLocation(value: object): boolean {
    if (!('streamLocationNode' in value)) return false;
    return true;
}

export function StreamLocationFromJSON(json: any): StreamLocation {
    return StreamLocationFromJSONTyped(json, false);
}

export function StreamLocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamLocation {
    if (json == null) {
        return json;
    }
    return {
        
        'streamLocationNode': StreamLocationNodeFromJSON(json['stream-location-node']),
        'publishedStation': json['published-station'] == null ? undefined : json['published-station'],
        'navigationStation': json['navigation-station'] == null ? undefined : json['navigation-station'],
        'lowestMeasurableStage': json['lowest-measurable-stage'] == null ? undefined : json['lowest-measurable-stage'],
        'totalDrainageArea': json['total-drainage-area'] == null ? undefined : json['total-drainage-area'],
        'ungagedDrainageArea': json['ungaged-drainage-area'] == null ? undefined : json['ungaged-drainage-area'],
        'areaUnits': json['area-units'] == null ? undefined : json['area-units'],
        'stageUnits': json['stage-units'] == null ? undefined : json['stage-units'],
    };
}

export function StreamLocationToJSON(value?: StreamLocation | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'stream-location-node': StreamLocationNodeToJSON(value['streamLocationNode']),
        'published-station': value['publishedStation'],
        'navigation-station': value['navigationStation'],
        'lowest-measurable-stage': value['lowestMeasurableStage'],
        'total-drainage-area': value['totalDrainageArea'],
        'ungaged-drainage-area': value['ungagedDrainageArea'],
        'area-units': value['areaUnits'],
        'stage-units': value['stageUnits'],
    };
}

