/* tslint:disable */
/* eslint-disable */
/**
 * zrok
 * zrok client access
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * 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 { Frontend } from './Frontend';
import {
    FrontendFromJSON,
    FrontendFromJSONTyped,
    FrontendToJSON,
} from './Frontend';
import type { Environment } from './Environment';
import {
    EnvironmentFromJSON,
    EnvironmentFromJSONTyped,
    EnvironmentToJSON,
} from './Environment';
import type { Share } from './Share';
import {
    ShareFromJSON,
    ShareFromJSONTyped,
    ShareToJSON,
} from './Share';

/**
 * 
 * @export
 * @interface EnvironmentAndResources
 */
export interface EnvironmentAndResources {
    /**
     * 
     * @type {Environment}
     * @memberof EnvironmentAndResources
     */
    environment?: Environment;
    /**
     * 
     * @type {Array<Frontend>}
     * @memberof EnvironmentAndResources
     */
    frontends?: Array<Frontend>;
    /**
     * 
     * @type {Array<Share>}
     * @memberof EnvironmentAndResources
     */
    shares?: Array<Share>;
}

/**
 * Check if a given object implements the EnvironmentAndResources interface.
 */
export function instanceOfEnvironmentAndResources(value: object): value is EnvironmentAndResources {
    return true;
}

export function EnvironmentAndResourcesFromJSON(json: any): EnvironmentAndResources {
    return EnvironmentAndResourcesFromJSONTyped(json, false);
}

export function EnvironmentAndResourcesFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnvironmentAndResources {
    if (json == null) {
        return json;
    }
    return {
        
        'environment': json['environment'] == null ? undefined : EnvironmentFromJSON(json['environment']),
        'frontends': json['frontends'] == null ? undefined : ((json['frontends'] as Array<any>).map(FrontendFromJSON)),
        'shares': json['shares'] == null ? undefined : ((json['shares'] as Array<any>).map(ShareFromJSON)),
    };
}

export function EnvironmentAndResourcesToJSON(value?: EnvironmentAndResources | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'environment': EnvironmentToJSON(value['environment']),
        'frontends': value['frontends'] == null ? undefined : ((value['frontends'] as Array<any>).map(FrontendToJSON)),
        'shares': value['shares'] == null ? undefined : ((value['shares'] as Array<any>).map(ShareToJSON)),
    };
}

