/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import type { QueryBuilderState } from '../../QueryBuilderState.js';
import { type CompilationError, type Class, type LambdaFunction, type VariableExpression, type Binding } from '@finos/legend-graph';
import { type QueryBuilderGraphFetchTreeData } from './QueryBuilderGraphFetchTreeUtil.js';
import { type QueryBuilderExplorerTreePropertyNodeData } from '../../explorer/QueryBuilderExplorerState.js';
import { QueryBuilderFetchStructureImplementationState } from '../QueryBuilderFetchStructureImplementationState.js';
import type { QueryBuilderFetchStructureState } from '../QueryBuilderFetchStructureState.js';
import type { LambdaFunctionBuilderOption } from '../../QueryBuilderValueSpecificationBuilderHelper.js';
import { type Hashable, ContentType } from '@finos/legend-shared';
import type { ExportDataInfo } from '../../QueryBuilderResultState.js';
export declare enum SERIALIZATION_TYPE {
    PURE = "PURE",
    EXTERNAL_FORMAT = "EXTERNAL_FORMAT"
}
export declare enum GRAPH_FETCH_EXPORT_DATA_FORMAT {
    RESULT = "RESULT"
}
export declare class PureSerializationConfig {
    typeKeyName: string;
    dateTimeFormat: string | undefined;
    includeType: boolean | undefined;
    includeEnumType: boolean | undefined;
    removePropertiesWithNullValues: boolean | undefined;
    removePropertiesWithEmptySets: boolean | undefined;
    fullyQualifiedTypePath: boolean | undefined;
    includeObjectReference: boolean | undefined;
    constructor();
    static createDefault(): PureSerializationConfig;
    setDateTimeFormat(val: string | undefined): void;
    setTypeName(val: string): void;
    setIncludeType(val: boolean): void;
    setInclueEnumType(val: boolean): void;
    setRemovePropertiesWithNullValues(val: boolean): void;
    setRemovePropertiesWithEmptySets(val: boolean): void;
    setFullyQualifiedTypePath(val: boolean): void;
    setIncludeObjectReference(val: boolean): void;
}
export declare abstract class GraphFetchSerializationState {
    readonly queryBuilderGraphFetchTreeState: QueryBuilderGraphFetchTreeState;
    constructor(graphFetchTreeState: QueryBuilderGraphFetchTreeState);
    abstract getLabel(): string;
    abstract get serializationContentType(): ContentType;
}
export declare class GraphFetchPureSerializationState extends GraphFetchSerializationState {
    config: PureSerializationConfig | undefined;
    configModal: boolean;
    constructor(graphFetchTreeState: QueryBuilderGraphFetchTreeState);
    setConfig(value: PureSerializationConfig | undefined): void;
    setConfigModal(val: boolean): void;
    getLabel(): string;
    get serializationContentType(): ContentType;
}
export declare class GraphFetchExternalFormatSerializationState extends GraphFetchSerializationState {
    targetBinding: Binding;
    treeData: QueryBuilderGraphFetchTreeData | undefined;
    constructor(graphFetchTreeState: QueryBuilderGraphFetchTreeState, targetBinding: Binding, treeData: QueryBuilderGraphFetchTreeData | undefined);
    setBinding(value: Binding): void;
    setGraphFetchTree(val: QueryBuilderGraphFetchTreeData | undefined): void;
    addProperty(node: QueryBuilderExplorerTreePropertyNodeData, options?: {
        refreshTreeData?: boolean;
    }): void;
    getLabel(): string;
    get serializationContentType(): ContentType;
}
export declare class QueryBuilderGraphFetchTreeState extends QueryBuilderFetchStructureImplementationState implements Hashable {
    treeData?: QueryBuilderGraphFetchTreeData | undefined;
    /**
     * If set to `true` we will use `graphFetchChecked` function instead of `graphFetch`.
     * `graphFetchChecked` will do extra checks on constraints and only work on M2M use case for now.
     * Hence we default this to `false` for graph fetch to work universally.
     */
    isChecked: boolean;
    /**
     * Used to describe how the graph fetch tree is serialized to the final result set
     */
    serializationState: GraphFetchSerializationState;
    constructor(queryBuilderState: QueryBuilderState, fetchStructureState: QueryBuilderFetchStructureState);
    get type(): string;
    get fetchLabel(): string;
    get canBeExportedToCube(): boolean;
    get usedExplorerTreePropertyNodeIDs(): string[];
    get fetchStructureValidationIssues(): string[];
    get allValidationIssues(): string[];
    initialize(): void;
    setSerializationState(val: GraphFetchSerializationState): void;
    setGraphFetchTree(val: QueryBuilderGraphFetchTreeData | undefined): void;
    setChecked(val: boolean): void;
    private updateTreeData;
    get exportDataFormatOptions(): string[];
    getExportDataInfo(format: string): ExportDataInfo;
    initializeWithQuery(): void;
    onClassChange(_class: Class | undefined): void;
    appendFetchStructure(lambdaFunction: LambdaFunction, options?: LambdaFunctionBuilderOption): void;
    addProperty(node: QueryBuilderExplorerTreePropertyNodeData, options?: {
        refreshTreeData?: boolean;
    }): void;
    revealCompilationError(compilationError: CompilationError): boolean;
    clearCompilationError(): void;
    fetchProperty(node: QueryBuilderExplorerTreePropertyNodeData): void;
    fetchProperties(nodes: QueryBuilderExplorerTreePropertyNodeData[]): void;
    checkBeforeChangingImplementation(onChange: () => void): void;
    isVariableUsed(variable: VariableExpression): boolean;
    get hasInvalidFilterValues(): boolean;
    get hasInvalidDerivedPropertyParameters(): boolean;
    get hashCode(): string;
}
//# sourceMappingURL=QueryBuilderGraphFetchTreeState.d.ts.map