UNPKG

cwmsjs

Version:

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

126 lines (117 loc) 3.59 kB
/* tslint:disable */ /* eslint-disable */ /** * CWMS Data API * CWMS REST API for Data Retrieval * * The version of the OpenAPI document: 2.4.0-2026.3.16 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import { AssignedLocation, AssignedLocationFromJSON, AssignedLocationFromJSONTyped, AssignedLocationToJSON, } from './AssignedLocation'; import { LocationCategory, 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>; } export function LocationGroupFromJSON(json: any): LocationGroup { return LocationGroupFromJSONTyped(json, false); } export function LocationGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationGroup { if ((json === undefined) || (json === null)) { return json; } return { 'officeId': json['office-id'], 'id': !exists(json, 'id') ? undefined : json['id'], 'locationCategory': !exists(json, 'location-category') ? undefined : LocationCategoryFromJSON(json['location-category']), 'description': !exists(json, 'description') ? undefined : json['description'], 'sharedLocAliasId': !exists(json, 'shared-loc-alias-id') ? undefined : json['shared-loc-alias-id'], 'sharedRefLocationId': !exists(json, 'shared-ref-location-id') ? undefined : json['shared-ref-location-id'], 'locGroupAttribute': !exists(json, 'loc-group-attribute') ? undefined : json['loc-group-attribute'], 'assignedLocations': !exists(json, 'assigned-locations') ? undefined : ((json['assigned-locations'] as Array<any>).map(AssignedLocationFromJSON)), }; } export function LocationGroupToJSON(value?: LocationGroup | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } 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 === undefined ? undefined : ((value.assignedLocations as Array<any>).map(AssignedLocationToJSON)), }; }