/* 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 {
    CwmsId,
    CwmsIdFromJSON,
    CwmsIdFromJSONTyped,
    CwmsIdToJSON,
} from './CwmsId';
import {
    Location,
    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;
}

export function OutletFromJSON(json: any): Outlet {
    return OutletFromJSONTyped(json, false);
}

export function OutletFromJSONTyped(json: any, ignoreDiscriminator: boolean): Outlet {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'projectId': CwmsIdFromJSON(json['project-id']),
        'location': LocationFromJSON(json['location']),
        'ratingGroupId': !exists(json, 'rating-group-id') ? undefined : CwmsIdFromJSON(json['rating-group-id']),
        'ratingSpecId': !exists(json, 'rating-spec-id') ? undefined : json['rating-spec-id'],
        'ratingCategoryId': !exists(json, 'rating-category-id') ? undefined : CwmsIdFromJSON(json['rating-category-id']),
    };
}

export function OutletToJSON(value?: Outlet | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    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),
    };
}

