import * as _fern_api_csharp_codegen_lib_context_model_navigator from '@fern-api/csharp-codegen/lib/context/model-navigator';
import * as _fern_api_csharp_codegen_lib_context_extern from '@fern-api/csharp-codegen/lib/context/extern';
import * as _fern_api_csharp_codegen from '@fern-api/csharp-codegen';
import { WithGeneration, ast, Generation } from '@fern-api/csharp-codegen';
import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options } from '@fern-api/browser-compatible-base-generator';
import { FernIr } from '@fern-api/dynamic-ir-sdk';

declare namespace DynamicTypeLiteralMapper {
    interface Args {
        typeReference: FernIr.dynamic.TypeReference;
        value: unknown;
        as?: ConvertedAs;
        fallbackToDefault?: string;
    }
    type ConvertedAs = "key";
}
declare class DynamicTypeLiteralMapper extends WithGeneration {
    private context;
    constructor({ context }: {
        context: DynamicSnippetsGeneratorContext;
    });
    convert(args: DynamicTypeLiteralMapper.Args): ast.TypeLiteral;
    private convertList;
    private convertLiteral;
    private convertSet;
    private convertMap;
    private convertNamed;
    private convertDiscriminatedUnion;
    private getBaseProperties;
    private instantiateUnionWithBaseProperties;
    private getEnumValue;
    private convertObject;
    private convertUndiscriminatedUnion;
    private findMatchingUndiscriminatedUnionType;
    private convertUnknown;
    private convertPrimitive;
    private getValueAsNumber;
    private getValueAsBoolean;
}

declare namespace DynamicTypeMapper {
    interface Args {
        typeReference: FernIr.dynamic.TypeReference;
        unboxOptionals?: boolean;
    }
}
declare class DynamicTypeMapper extends WithGeneration {
    private context;
    constructor({ context }: {
        context: DynamicSnippetsGeneratorContext;
    });
    convert(args: DynamicTypeMapper.Args): ast.Type;
    convertToClassReference(named: FernIr.dynamic.NamedType): ast.ClassReference;
    private convertNamed;
    private convertLiteral;
    private convertUnknown;
    private convertPrimitive;
}

interface FilePropertyInfo {
    fileFields: ast.ConstructorField[];
    bodyPropertyFields: ast.ConstructorField[];
}
declare class FilePropertyMapper extends WithGeneration {
    private context;
    constructor({ context }: {
        context: DynamicSnippetsGeneratorContext;
    });
    getFilePropertyInfo({ body, value }: {
        body: FernIr.dynamic.FileUploadRequestBody;
        value: unknown;
    }): FilePropertyInfo;
    private getSingleFileProperty;
    private getArrayFileProperty;
    private getBodyProperty;
}

declare class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGeneratorContext {
    ir: FernIr.dynamic.DynamicIntermediateRepresentation;
    dynamicTypeMapper: DynamicTypeMapper;
    dynamicTypeLiteralMapper: DynamicTypeLiteralMapper;
    filePropertyMapper: FilePropertyMapper;
    readonly generation: Generation;
    get namespaces(): {
        root: string;
        core: string;
        test: string;
        testUtils: string;
        mockServerTest: string;
        publicCore: string;
        asyncCore: string;
        publicCoreTest: string;
        asIsTestUtils: string;
        publicCoreClasses: string;
        implicit: Set<string>;
    };
    get registry(): _fern_api_csharp_codegen.NameRegistry;
    get extern(): _fern_api_csharp_codegen_lib_context_extern.Extern;
    get settings(): {
        namespace: string;
        readOnlyMemoryTypes: string[];
        simplifyObjectDictionaries: boolean;
        useFullyQualifiedNamespaces: boolean;
        useDotnetFormat: boolean;
        enableWebsockets: boolean;
        enableReadonlyConstants: boolean;
        temporaryWebsocketEnvironments: Record<string, {
            environments: Record<string, string>;
            "default-environment"?: string | undefined;
        }>;
        baseApiExceptionClassName: string;
        baseExceptionClassName: string;
        shouldGeneratedDiscriminatedUnions: boolean;
        exportedClientClassName: string;
        clientClassName: string;
        rootNamespaceForCoreClasses: boolean;
        packageId: string;
        isForwardCompatibleEnumsEnabled: boolean;
        websocketEnvironments: Record<string, {
            environments: Record<string, string>;
            "default-environment"?: string | undefined;
        }>;
        generateNewAdditionalProperties: boolean;
        customPagerName: string;
        environmentClassName: string;
        generateErrorTypes: boolean;
        shouldInlinePathParameters: boolean;
        includeExceptionHandler: boolean;
        shouldGenerateMockServerTests: boolean;
        rootClientAccess: "public" | "internal";
        extraDependencies: Record<string, string>;
        pascalCaseEnvironments: boolean;
        explicitNamespaces: boolean;
    };
    get constants(): {
        folders: {
            mockServerTests: _fern_api_csharp_codegen.TRelativeFilePath;
            types: string;
            exceptions: string;
            src: string;
            protobuf: string;
            serializationTests: _fern_api_csharp_codegen.TRelativeFilePath;
            project: _fern_api_csharp_codegen.TRelativeFilePath;
            sourceFiles: _fern_api_csharp_codegen.TRelativeFilePath;
            coreFiles: _fern_api_csharp_codegen.TRelativeFilePath;
            publicCoreFiles: _fern_api_csharp_codegen.TRelativeFilePath;
            testFiles: _fern_api_csharp_codegen.TRelativeFilePath;
        };
        formatting: {
            indent: string;
        };
        defaults: {
            core: string;
            publicCore: string;
            version: string;
        };
    };
    get names(): {
        classes: {
            baseApiException: string;
            baseException: string;
            rootClient: string;
            rootClientForSnippets: string;
            customPager: string;
            environment: string;
        };
        project: {
            client: string;
            clientPrefix: string;
            packageId: string;
        };
        files: {
            project: string;
            testProject: string;
        };
        methods: {
            mockOauth: string;
            getAccessTokenAsync: string;
        };
        variables: {
            client: string;
            response: string;
            httpRequest: string;
            sendRequest: string;
            responseBody: string;
            query: string;
            headers: string;
        };
        parameters: {
            cancellationToken: string;
            requestOptions: string;
            idempotentOptions: string;
        };
    };
    get types(): {
        FormRequest: ast.ClassReference;
        ClientOptions: ast.ClassReference;
        RawClient: ast.ClassReference;
        RequestOptions: ast.ClassReference;
        RequestOptionsInterface: ast.ClassReference;
        JsonRequest: ast.ClassReference;
        Version: ast.ClassReference;
        ValueConvert: ast.ClassReference;
        FileParameter: ast.ClassReference;
        Headers: ast.ClassReference;
        HeaderValue: ast.ClassReference;
        RootClient: ast.ClassReference;
        RootClientForSnippets: ast.ClassReference;
        BaseApiException: ast.ClassReference;
        BaseException: ast.ClassReference;
        ExceptionInterceptor: ast.ClassReference;
        ExceptionHandler: ast.ClassReference;
        ProtoAnyMapper: ast.ClassReference;
        Constants: ast.ClassReference;
        EnumSerializer: ast.ClassReference;
        DateTimeSerializer: ast.ClassReference;
        JsonUtils: ast.ClassReference;
        CustomPagerFactory: ast.ClassReference;
        CustomPagerContext: ast.ClassReference;
        Environments: ast.ClassReference;
        TestClient: ast.ClassReference;
        BaseMockServerTest: ast.ClassReference;
        IdempotentRequestOptions: ast.ClassReference;
        IdempotentRequestOptionsInterface: ast.ClassReference;
        IStringEnum: ast.ClassReference;
        AsyncApiOptions: ast.ClassReference;
        QueryBuilder: ast.ClassReference;
        OAuthTokenProvider: ast.ClassReference;
        ProtoConverter: ast.ClassReference;
        RawGrpcClient: ast.ClassReference;
        Extensions: ast.ClassReference;
        GrpcRequestOptions: ast.ClassReference;
        GrpcChannelOptions: ast.ClassReference;
        StringEnum: (genericType?: ast.Type | ast.ClassReference) => ast.ClassReference;
        AsyncApi: (genericType: ast.Type | ast.ClassReference) => ast.ClassReference;
        AsyncEvent: (genericType: ast.Type | ast.ClassReference) => ast.ClassReference;
        StringEnumSerializer: (enumClassReference: ast.Type | ast.ClassReference) => ast.ClassReference;
        CustomPagerClass: (itemType: ast.Type | ast.ClassReference) => ast.ClassReference;
        Pager: (itemType: ast.Type | ast.ClassReference) => ast.ClassReference;
        OffsetPager: ({ requestType, requestOptionsType, responseType, offsetType, stepType, itemType }: {
            requestType: ast.Type | ast.TypeParameter;
            requestOptionsType: ast.Type | ast.TypeParameter;
            responseType: ast.Type | ast.TypeParameter;
            offsetType: ast.Type | ast.TypeParameter;
            stepType: ast.Type | ast.TypeParameter;
            itemType: ast.Type | ast.TypeParameter;
        }) => ast.ClassReference;
        CursorPager: ({ requestType, requestOptionsType, responseType, cursorType, itemType }: {
            requestType: ast.Type | ast.TypeParameter;
            requestOptionsType: ast.Type | ast.TypeParameter;
            responseType: ast.Type | ast.TypeParameter;
            cursorType: ast.Type | ast.TypeParameter;
            itemType: ast.Type | ast.TypeParameter;
        }) => ast.ClassReference;
        CollectionItemSerializer: (itemType: ast.ClassReference, serializer: ast.ClassReference) => ast.ClassReference;
        OneOfSerializer: (oneof: ast.Type | ast.ClassReference) => ast.ClassReference;
        AdditionalProperties: (genericType?: ast.Type | ast.ClassReference) => ast.ClassReference;
        ReadOnlyAdditionalProperties: (genericType?: ast.Type | ast.ClassReference) => ast.ClassReference;
    };
    get model(): _fern_api_csharp_codegen_lib_context_model_navigator.ModelNavigator;
    get csharp(): _fern_api_csharp_codegen.CSharp;
    get System(): {
        Action: (typeParameters?: (ast.ClassReference | ast.TypeParameter | ast.Type)[]) => ast.ClassReference;
        Func: (typeParameters?: (ast.Type | ast.TypeParameter | ast.ClassReference)[], returnType?: ast.Type | ast.TypeParameter | ast.ClassReference) => ast.ClassReference;
        DateOnly: ast.ClassReference;
        DateTime: ast.ClassReference;
        Enum: ast.ClassReference;
        Exception: ast.ClassReference;
        ReadOnlyMemory: (type: ast.Type | ast.ClassReference | ast.TypeParameter) => ast.ClassReference;
        Serializable: ast.ClassReference;
        String: ast.ClassReference;
        TimeSpan: ast.ClassReference;
        Uri: ast.ClassReference;
        UriBuilder: ast.ClassReference;
        Runtime: {
            Serialization: {
                EnumMember: ast.ClassReference;
            };
        };
        Collections: {
            Generic: {
                IAsyncEnumerable: (elementType?: ast.ClassReference | ast.TypeParameter | ast.Type) => ast.ClassReference;
                IEnumerable: (elementType?: ast.ClassReference | ast.TypeParameter | ast.Type) => ast.ClassReference;
                KeyValuePair: (keyType?: ast.ClassReference | ast.TypeParameter | ast.Type, valueType?: ast.ClassReference | ast.TypeParameter | ast.Type) => ast.ClassReference;
                List: (elementType?: ast.ClassReference | ast.TypeParameter | ast.Type) => ast.ClassReference;
                HashSet: (elementType?: ast.ClassReference | ast.TypeParameter | ast.Type) => ast.ClassReference;
                Dictionary: (keyType?: ast.ClassReference | ast.TypeParameter | ast.Type, valueType?: ast.ClassReference | ast.TypeParameter | ast.Type) => ast.ClassReference;
                IDictionary: (keyType: ast.Type | ast.ClassReference | ast.TypeParameter, valueType: ast.Type | ast.ClassReference | ast.TypeParameter) => ast.ClassReference;
            };
            Linq: {
                Enumerable: ast.ClassReference;
            };
        };
        Globalization: {
            DateTimeStyles: ast.ClassReference;
        };
        Linq: {
            Enumerable: ast.ClassReference;
        };
        Net: {
            Http: {
                HttpClient: ast.ClassReference;
                HttpMethod: ast.ClassReference;
                HttpResponseHeaders: ast.ClassReference;
            };
            ServerSentEvents: {
                SseEvent: ast.ClassReference;
                SseParser: ast.ClassReference;
            };
            WebSockets: {
                ClientWebSocketOptions: ast.ClassReference;
            };
        };
        IO: {
            MemoryStream: ast.ClassReference;
            Stream: ast.ClassReference;
            StreamReader: ast.ClassReference;
        };
        Text: {
            Encoding: ast.ClassReference;
            Encoding_UTF8: ast.ClassReference;
            Json: {
                JsonElement: ast.ClassReference;
                JsonDocument: ast.ClassReference;
                JsonException: ast.ClassReference;
                Utf8JsonReader: ast.ClassReference;
                JsonSerializerOptions: ast.ClassReference;
                JsonSerializer: ast.ClassReference;
                Utf8JsonWriter: ast.ClassReference;
                Nodes: {
                    JsonNode: ast.ClassReference;
                    JsonObject: ast.ClassReference;
                };
                Serialization: {
                    IJsonOnDeserialized: ast.ClassReference;
                    IJsonOnSerializing: ast.ClassReference;
                    JsonOnDeserializedAttribute: ast.ClassReference;
                    JsonExtensionData: ast.ClassReference;
                    JsonConverter: (typeToConvert?: ast.ClassReference | ast.TypeParameter | ast.Type) => ast.ClassReference;
                    JsonIgnore: ast.ClassReference;
                    JsonPropertyName: ast.ClassReference;
                };
            };
        };
        Threading: {
            CancellationToken: ast.ClassReference;
            Tasks: {
                Task: (ofType?: ast.ClassReference | ast.TypeParameter | ast.Type) => ast.ClassReference;
            };
        };
    };
    get NUnit(): {
        Framework: {
            TestFixture: ast.ClassReference;
            Test: ast.ClassReference;
            OneTimeTearDown: ast.ClassReference;
            OneTimeSetUp: ast.ClassReference;
            SetUpFixture: ast.ClassReference;
        };
    };
    get OneOf(): {
        OneOf: (generics?: ast.ClassReference[] | ast.TypeParameter[] | ast.Type[]) => ast.ClassReference;
        OneOfBase: (generics?: ast.ClassReference[] | ast.TypeParameter[] | ast.Type[]) => ast.ClassReference;
    };
    get Google(): {
        Protobuf: {
            WellKnownTypes: {
                Struct: ast.ClassReference;
                Value: ast.ClassReference;
                ListValue: ast.ClassReference;
                Timestamp: ast.ClassReference;
            };
        };
    };
    constructor({ ir, config, options, generation }: {
        ir: FernIr.dynamic.DynamicIntermediateRepresentation;
        config: FernGeneratorExec.GeneratorConfig;
        options?: Options;
        generation?: Generation;
    });
    clone(): DynamicSnippetsGeneratorContext;
    getFileParameterForString(str: string): ast.TypeLiteral;
    getMemoryStreamForString(str: string): ast.ClassInstantiation;
    getClassName(name: FernIr.Name): string;
    getParameterName(name: FernIr.Name): string;
    getPropertyName(name: FernIr.Name): string;
    getMethodName(name: FernIr.Name): string;
    getNamespace(fernFilepath: FernIr.dynamic.FernFilepath, suffix?: string): string;
    getEnvironmentTypeReferenceFromID(environmentID: string): ast.ClassReference | undefined;
    private getEnvironmentClassReferenceForEnumName;
    private getNamespaceSegments;
    precalculate(requests: Partial<FernIr.dynamic.EndpointSnippetRequest>[]): void;
}

export { DynamicSnippetsGeneratorContext as D, type FilePropertyInfo as F, DynamicTypeLiteralMapper as a, DynamicTypeMapper as b, FilePropertyMapper as c };
