/* 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 { SparkDataSample } from './SparkDataSample';
import {
    SparkDataSampleFromJSON,
    SparkDataSampleFromJSONTyped,
    SparkDataSampleToJSON,
} from './SparkDataSample';

/**
 * 
 * @export
 * @interface Share
 */
export interface Share {
    /**
     * 
     * @type {string}
     * @memberof Share
     */
    token?: string;
    /**
     * 
     * @type {string}
     * @memberof Share
     */
    zId?: string;
    /**
     * 
     * @type {string}
     * @memberof Share
     */
    shareMode?: string;
    /**
     * 
     * @type {string}
     * @memberof Share
     */
    backendMode?: string;
    /**
     * 
     * @type {string}
     * @memberof Share
     */
    frontendSelection?: string;
    /**
     * 
     * @type {string}
     * @memberof Share
     */
    frontendEndpoint?: string;
    /**
     * 
     * @type {string}
     * @memberof Share
     */
    backendProxyEndpoint?: string;
    /**
     * 
     * @type {boolean}
     * @memberof Share
     */
    reserved?: boolean;
    /**
     * 
     * @type {Array<SparkDataSample>}
     * @memberof Share
     */
    activity?: Array<SparkDataSample>;
    /**
     * 
     * @type {boolean}
     * @memberof Share
     */
    limited?: boolean;
    /**
     * 
     * @type {number}
     * @memberof Share
     */
    createdAt?: number;
    /**
     * 
     * @type {number}
     * @memberof Share
     */
    updatedAt?: number;
}

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

export function ShareFromJSON(json: any): Share {
    return ShareFromJSONTyped(json, false);
}

export function ShareFromJSONTyped(json: any, ignoreDiscriminator: boolean): Share {
    if (json == null) {
        return json;
    }
    return {
        
        'token': json['token'] == null ? undefined : json['token'],
        'zId': json['zId'] == null ? undefined : json['zId'],
        'shareMode': json['shareMode'] == null ? undefined : json['shareMode'],
        'backendMode': json['backendMode'] == null ? undefined : json['backendMode'],
        'frontendSelection': json['frontendSelection'] == null ? undefined : json['frontendSelection'],
        'frontendEndpoint': json['frontendEndpoint'] == null ? undefined : json['frontendEndpoint'],
        'backendProxyEndpoint': json['backendProxyEndpoint'] == null ? undefined : json['backendProxyEndpoint'],
        'reserved': json['reserved'] == null ? undefined : json['reserved'],
        'activity': json['activity'] == null ? undefined : ((json['activity'] as Array<any>).map(SparkDataSampleFromJSON)),
        'limited': json['limited'] == null ? undefined : json['limited'],
        'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
        'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'],
    };
}

export function ShareToJSON(value?: Share | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'token': value['token'],
        'zId': value['zId'],
        'shareMode': value['shareMode'],
        'backendMode': value['backendMode'],
        'frontendSelection': value['frontendSelection'],
        'frontendEndpoint': value['frontendEndpoint'],
        'backendProxyEndpoint': value['backendProxyEndpoint'],
        'reserved': value['reserved'],
        'activity': value['activity'] == null ? undefined : ((value['activity'] as Array<any>).map(SparkDataSampleToJSON)),
        'limited': value['limited'],
        'createdAt': value['createdAt'],
        'updatedAt': value['updatedAt'],
    };
}

