UNPKG

cwmsjs

Version:

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

108 lines (98 loc) 2.6 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 { Location } from './Location'; import { LocationFromJSON, LocationFromJSONTyped, LocationToJSON, } from './Location'; /** * * @export * @interface Outlet */ export interface Outlet { /** * * @type {CwmsId} * @memberof Outlet */ projectId: CwmsId; /** * * @type {Location} * @memberof Outlet */ location: Location; /** * * @type {CwmsId} * @memberof Outlet */ ratingGroupId?: CwmsId; /** * * @type {string} * @memberof Outlet */ ratingSpecId?: string; /** * * @type {CwmsId} * @memberof Outlet */ ratingCategoryId?: CwmsId; } /** * Check if a given object implements the Outlet interface. */ export function instanceOfOutlet(value: object): boolean { if (!('projectId' in value)) return false; if (!('location' in value)) return false; return true; } export function OutletFromJSON(json: any): Outlet { return OutletFromJSONTyped(json, false); } export function OutletFromJSONTyped(json: any, ignoreDiscriminator: boolean): Outlet { if (json == null) { return json; } return { 'projectId': CwmsIdFromJSON(json['project-id']), 'location': LocationFromJSON(json['location']), 'ratingGroupId': json['rating-group-id'] == null ? undefined : CwmsIdFromJSON(json['rating-group-id']), 'ratingSpecId': json['rating-spec-id'] == null ? undefined : json['rating-spec-id'], 'ratingCategoryId': json['rating-category-id'] == null ? undefined : CwmsIdFromJSON(json['rating-category-id']), }; } export function OutletToJSON(value?: Outlet | null): any { if (value == null) { return value; } return { 'project-id': CwmsIdToJSON(value['projectId']), 'location': LocationToJSON(value['location']), 'rating-group-id': CwmsIdToJSON(value['ratingGroupId']), 'rating-spec-id': value['ratingSpecId'], 'rating-category-id': CwmsIdToJSON(value['ratingCategoryId']), }; }