/* 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';
/**
 * A representation of a CWMS office
 * @export
 * @interface Office
 */
export interface Office {
    /**
     * 
     * @type {string}
     * @memberof Office
     */
    name?: string;
    /**
     * 
     * @type {string}
     * @memberof Office
     */
    longName?: string;
    /**
     * 
     * @type {string}
     * @memberof Office
     */
    type?: OfficeTypeEnum;
    /**
     * Reference to another office, like a division, that this office reports to.
     * @type {string}
     * @memberof Office
     */
    reportsTo?: string;
}

/**
* @export
* @enum {string}
*/
export enum OfficeTypeEnum {
    Unknown = 'unknown',
    CorpsHeadquarters = 'corps headquarters',
    DivisionHeadquarters = 'division headquarters',
    DivisionRegional = 'division regional',
    District = 'district',
    FiledOperatingActivity = 'filed operating activity'
}

export function OfficeFromJSON(json: any): Office {
    return OfficeFromJSONTyped(json, false);
}

export function OfficeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Office {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'name': !exists(json, 'name') ? undefined : json['name'],
        'longName': !exists(json, 'long-name') ? undefined : json['long-name'],
        'type': !exists(json, 'type') ? undefined : json['type'],
        'reportsTo': !exists(json, 'reports-to') ? undefined : json['reports-to'],
    };
}

export function OfficeToJSON(value?: Office | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'name': value.name,
        'long-name': value.longName,
        'type': value.type,
        'reports-to': value.reportsTo,
    };
}

