/* tslint:disable */
/* eslint-disable */
/**
 * zrok
 * zrok client access
 *
 * The version of the OpenAPI document: 0.3.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 { exists, mapValues } from '../runtime';
import type { SparkDataSample } from './SparkDataSample';
import {
    SparkDataSampleFromJSON,
    SparkDataSampleFromJSONTyped,
    SparkDataSampleToJSON,
} from './SparkDataSample';

/**
 * 
 * @export
 * @interface Environment
 */
export interface Environment {
    /**
     * 
     * @type {string}
     * @memberof Environment
     */
    description?: string;
    /**
     * 
     * @type {string}
     * @memberof Environment
     */
    host?: string;
    /**
     * 
     * @type {string}
     * @memberof Environment
     */
    address?: string;
    /**
     * 
     * @type {string}
     * @memberof Environment
     */
    zId?: string;
    /**
     * 
     * @type {Array<SparkDataSample>}
     * @memberof Environment
     */
    activity?: Array<SparkDataSample>;
    /**
     * 
     * @type {boolean}
     * @memberof Environment
     */
    limited?: boolean;
    /**
     * 
     * @type {number}
     * @memberof Environment
     */
    createdAt?: number;
    /**
     * 
     * @type {number}
     * @memberof Environment
     */
    updatedAt?: number;
}

/**
 * Check if a given object implements the Environment interface.
 */
export function instanceOfEnvironment(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function EnvironmentFromJSON(json: any): Environment {
    return EnvironmentFromJSONTyped(json, false);
}

export function EnvironmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Environment {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'description': !exists(json, 'description') ? undefined : json['description'],
        'host': !exists(json, 'host') ? undefined : json['host'],
        'address': !exists(json, 'address') ? undefined : json['address'],
        'zId': !exists(json, 'zId') ? undefined : json['zId'],
        'activity': !exists(json, 'activity') ? undefined : ((json['activity'] as Array<any>).map(SparkDataSampleFromJSON)),
        'limited': !exists(json, 'limited') ? undefined : json['limited'],
        'createdAt': !exists(json, 'createdAt') ? undefined : json['createdAt'],
        'updatedAt': !exists(json, 'updatedAt') ? undefined : json['updatedAt'],
    };
}

export function EnvironmentToJSON(value?: Environment | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'description': value.description,
        'host': value.host,
        'address': value.address,
        'zId': value.zId,
        'activity': value.activity === undefined ? undefined : ((value.activity as Array<any>).map(SparkDataSampleToJSON)),
        'limited': value.limited,
        'createdAt': value.createdAt,
        'updatedAt': value.updatedAt,
    };
}

