UNPKG

cwmsjs

Version:

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

131 lines (121 loc) 3.79 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 { AssignedLocation } from './AssignedLocation'; import { AssignedLocationFromJSON, AssignedLocationFromJSONTyped, AssignedLocationToJSON, } from './AssignedLocation'; import type { LocationCategory } from './LocationCategory'; import { LocationCategoryFromJSON, LocationCategoryFromJSONTyped, LocationCategoryToJSON, } from './LocationCategory'; /** * A representation of a location group * @export * @interface LocationGroup */ export interface LocationGroup { /** * Owning office of object. * @type {string} * @memberof LocationGroup */ officeId: string; /** * * @type {string} * @memberof LocationGroup */ id?: string; /** * * @type {LocationCategory} * @memberof LocationGroup */ locationCategory?: LocationCategory; /** * * @type {string} * @memberof LocationGroup */ description?: string; /** * * @type {string} * @memberof LocationGroup */ sharedLocAliasId?: string; /** * * @type {string} * @memberof LocationGroup */ sharedRefLocationId?: string; /** * * @type {number} * @memberof LocationGroup */ locGroupAttribute?: number; /** * * @type {Array<AssignedLocation>} * @memberof LocationGroup */ assignedLocations?: Array<AssignedLocation>; } /** * Check if a given object implements the LocationGroup interface. */ export function instanceOfLocationGroup(value: object): boolean { if (!('officeId' in value)) return false; return true; } export function LocationGroupFromJSON(json: any): LocationGroup { return LocationGroupFromJSONTyped(json, false); } export function LocationGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationGroup { if (json == null) { return json; } return { 'officeId': json['office-id'], 'id': json['id'] == null ? undefined : json['id'], 'locationCategory': json['location-category'] == null ? undefined : LocationCategoryFromJSON(json['location-category']), 'description': json['description'] == null ? undefined : json['description'], 'sharedLocAliasId': json['shared-loc-alias-id'] == null ? undefined : json['shared-loc-alias-id'], 'sharedRefLocationId': json['shared-ref-location-id'] == null ? undefined : json['shared-ref-location-id'], 'locGroupAttribute': json['loc-group-attribute'] == null ? undefined : json['loc-group-attribute'], 'assignedLocations': json['assigned-locations'] == null ? undefined : ((json['assigned-locations'] as Array<any>).map(AssignedLocationFromJSON)), }; } export function LocationGroupToJSON(value?: LocationGroup | null): any { if (value == null) { return value; } return { 'office-id': value['officeId'], 'id': value['id'], 'location-category': LocationCategoryToJSON(value['locationCategory']), 'description': value['description'], 'shared-loc-alias-id': value['sharedLocAliasId'], 'shared-ref-location-id': value['sharedRefLocationId'], 'loc-group-attribute': value['locGroupAttribute'], 'assigned-locations': value['assignedLocations'] == null ? undefined : ((value['assignedLocations'] as Array<any>).map(AssignedLocationToJSON)), }; }