/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { TableQueryFromJSON, TableQueryToJSON, } from './TableQuery';
/**
 * @export
 */
export const CreateGridRequestConcreteTypeEnum = {
    org_sagebionetworks_repo_model_grid_CreateGridRequest: 'org.sagebionetworks.repo.model.grid.CreateGridRequest'
};
/**
 * @export
 */
export const CreateGridRequestAuthorizationModeEnum = {
    SESSION_OWNER: 'SESSION_OWNER',
    SOURCE_BENEFACTOR: 'SOURCE_BENEFACTOR'
};
/**
 * Check if a given object implements the CreateGridRequest interface.
 */
export function instanceOfCreateGridRequest(value) {
    if (!('concreteType' in value) || value['concreteType'] === undefined)
        return false;
    if (!Object.values(CreateGridRequestConcreteTypeEnum).includes(value["concreteType"])) {
        return false;
    }
    return true;
}
export function CreateGridRequestFromJSON(json) {
    return CreateGridRequestFromJSONTyped(json, false);
}
export function CreateGridRequestFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'concreteType': json['concreteType'],
        'initialQuery': json['initialQuery'] == null ? undefined : TableQueryFromJSON(json['initialQuery']),
        'recordSetId': json['recordSetId'] == null ? undefined : json['recordSetId'],
        'ownerPrincipalId': json['ownerPrincipalId'] == null ? undefined : json['ownerPrincipalId'],
        'authorizationMode': json['authorizationMode'] == null ? undefined : json['authorizationMode'],
    };
}
export function CreateGridRequestToJSON(json) {
    return CreateGridRequestToJSONTyped(json, false);
}
export function CreateGridRequestToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'concreteType': value['concreteType'],
        'initialQuery': TableQueryToJSON(value['initialQuery']),
        'recordSetId': value['recordSetId'],
        'ownerPrincipalId': value['ownerPrincipalId'],
        'authorizationMode': value['authorizationMode'],
    };
}
//# sourceMappingURL=CreateGridRequest.js.map