/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
import { LogEntry, LogLevel_Level } from '../../../../yandex/cloud/logging/v1/log_entry';
export declare const protobufPackage = "yandex.cloud.logging.v1";
export interface ReadRequest {
    /**
     * Page token. To get the next page of results, set `page_token` to the
     * [ReadResponse.next_page_token] or [ReadResponse.previous_page_token] returned by a previous read request.
     */
    pageToken: string | undefined;
    /**
     * Read criteria.
     *
     * See [Criteria] for details.
     */
    criteria?: Criteria | undefined;
}
export interface ReadResponse {
    /** Log group ID the read was performed from. */
    logGroupId: string;
    /** List of matching log entries. */
    entries: LogEntry[];
    /**
     * Token for getting the next page of the log entries.
     *
     * After getting log entries initially with [Criteria], you can use `next_page_token` as the value
     * for the [ReadRequest.page_token] parameter in the next read request.
     *
     * Each subsequent page will have its own `next_page_token` to continue paging through the results.
     */
    nextPageToken: string;
    /**
     * Token for getting the previous page of the log entries.
     *
     * After getting log entries initially with [Criteria], you can use `previous_page_token` as the value
     * for the [ReadRequest.page_token] parameter in the next read request.
     *
     * Each subsequent page will have its own `next_page_token` to continue paging through the results.
     */
    previousPageToken: string;
}
/** Read criteria. Should be used in initial [ReadRequest]. */
export interface Criteria {
    /**
     * ID of the log group to return.
     *
     * To get a log group ID make a [LogGroupService.List] request.
     */
    logGroupId: string;
    /**
     * List of resource types to limit log entries to.
     *
     * Empty list disables filter.
     */
    resourceTypes: string[];
    /**
     * List of resource IDs to limit log entries to.
     *
     * Empty list disables filter.
     */
    resourceIds: string[];
    /** Lower bound of log entries timestamps. */
    since?: Date;
    /** Upper bound of log entries timestamps. */
    until?: Date;
    /**
     * List of log levels to limit log entries to.
     *
     * Empty list disables filter.
     */
    levels: LogLevel_Level[];
    /** Filter expression. For details about filtering, see [documentation](/docs/logging/concepts/filter). */
    filter: string;
    /**
     * List of stream names to limit log entries to.
     *
     * Empty list disables filter.
     */
    streamNames: string[];
    /** The maximum number of results per page to return. */
    pageSize: number;
    /**
     * Limits response to maximum size in bytes. Prevents gRPC resource exhaustion.
     *
     * Default value for max response size is 3.5 MiB
     */
    maxResponseSize: number;
}
export declare const ReadRequest: {
    encode(message: ReadRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ReadRequest;
    fromJSON(object: any): ReadRequest;
    toJSON(message: ReadRequest): unknown;
    fromPartial<I extends {
        pageToken?: string | undefined;
        criteria?: {
            logGroupId?: string | undefined;
            resourceTypes?: string[] | undefined;
            resourceIds?: string[] | undefined;
            since?: Date | undefined;
            until?: Date | undefined;
            levels?: LogLevel_Level[] | undefined;
            filter?: string | undefined;
            streamNames?: string[] | undefined;
            pageSize?: number | undefined;
            maxResponseSize?: number | undefined;
        } | undefined;
    } & {
        pageToken?: string | undefined;
        criteria?: ({
            logGroupId?: string | undefined;
            resourceTypes?: string[] | undefined;
            resourceIds?: string[] | undefined;
            since?: Date | undefined;
            until?: Date | undefined;
            levels?: LogLevel_Level[] | undefined;
            filter?: string | undefined;
            streamNames?: string[] | undefined;
            pageSize?: number | undefined;
            maxResponseSize?: number | undefined;
        } & {
            logGroupId?: string | undefined;
            resourceTypes?: (string[] & string[] & Record<Exclude<keyof I["criteria"]["resourceTypes"], keyof string[]>, never>) | undefined;
            resourceIds?: (string[] & string[] & Record<Exclude<keyof I["criteria"]["resourceIds"], keyof string[]>, never>) | undefined;
            since?: Date | undefined;
            until?: Date | undefined;
            levels?: (LogLevel_Level[] & LogLevel_Level[] & Record<Exclude<keyof I["criteria"]["levels"], keyof LogLevel_Level[]>, never>) | undefined;
            filter?: string | undefined;
            streamNames?: (string[] & string[] & Record<Exclude<keyof I["criteria"]["streamNames"], keyof string[]>, never>) | undefined;
            pageSize?: number | undefined;
            maxResponseSize?: number | undefined;
        } & Record<Exclude<keyof I["criteria"], keyof Criteria>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof ReadRequest>, never>>(object: I): ReadRequest;
};
export declare const ReadResponse: {
    encode(message: ReadResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ReadResponse;
    fromJSON(object: any): ReadResponse;
    toJSON(message: ReadResponse): unknown;
    fromPartial<I extends {
        logGroupId?: string | undefined;
        entries?: {
            uid?: string | undefined;
            resource?: {
                type?: string | undefined;
                id?: string | undefined;
            } | undefined;
            timestamp?: Date | undefined;
            ingestedAt?: Date | undefined;
            savedAt?: Date | undefined;
            level?: LogLevel_Level | undefined;
            message?: string | undefined;
            jsonPayload?: {
                [x: string]: any;
            } | undefined;
            streamName?: string | undefined;
        }[] | undefined;
        nextPageToken?: string | undefined;
        previousPageToken?: string | undefined;
    } & {
        logGroupId?: string | undefined;
        entries?: ({
            uid?: string | undefined;
            resource?: {
                type?: string | undefined;
                id?: string | undefined;
            } | undefined;
            timestamp?: Date | undefined;
            ingestedAt?: Date | undefined;
            savedAt?: Date | undefined;
            level?: LogLevel_Level | undefined;
            message?: string | undefined;
            jsonPayload?: {
                [x: string]: any;
            } | undefined;
            streamName?: string | undefined;
        }[] & ({
            uid?: string | undefined;
            resource?: {
                type?: string | undefined;
                id?: string | undefined;
            } | undefined;
            timestamp?: Date | undefined;
            ingestedAt?: Date | undefined;
            savedAt?: Date | undefined;
            level?: LogLevel_Level | undefined;
            message?: string | undefined;
            jsonPayload?: {
                [x: string]: any;
            } | undefined;
            streamName?: string | undefined;
        } & {
            uid?: string | undefined;
            resource?: ({
                type?: string | undefined;
                id?: string | undefined;
            } & {
                type?: string | undefined;
                id?: string | undefined;
            } & Record<Exclude<keyof I["entries"][number]["resource"], keyof import("./log_resource").LogEntryResource>, never>) | undefined;
            timestamp?: Date | undefined;
            ingestedAt?: Date | undefined;
            savedAt?: Date | undefined;
            level?: LogLevel_Level | undefined;
            message?: string | undefined;
            jsonPayload?: ({
                [x: string]: any;
            } & {
                [x: string]: any;
            } & Record<Exclude<keyof I["entries"][number]["jsonPayload"], string | number>, never>) | undefined;
            streamName?: string | undefined;
        } & Record<Exclude<keyof I["entries"][number], keyof LogEntry>, never>)[] & Record<Exclude<keyof I["entries"], keyof {
            uid?: string | undefined;
            resource?: {
                type?: string | undefined;
                id?: string | undefined;
            } | undefined;
            timestamp?: Date | undefined;
            ingestedAt?: Date | undefined;
            savedAt?: Date | undefined;
            level?: LogLevel_Level | undefined;
            message?: string | undefined;
            jsonPayload?: {
                [x: string]: any;
            } | undefined;
            streamName?: string | undefined;
        }[]>, never>) | undefined;
        nextPageToken?: string | undefined;
        previousPageToken?: string | undefined;
    } & Record<Exclude<keyof I, keyof ReadResponse>, never>>(object: I): ReadResponse;
};
export declare const Criteria: {
    encode(message: Criteria, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): Criteria;
    fromJSON(object: any): Criteria;
    toJSON(message: Criteria): unknown;
    fromPartial<I extends {
        logGroupId?: string | undefined;
        resourceTypes?: string[] | undefined;
        resourceIds?: string[] | undefined;
        since?: Date | undefined;
        until?: Date | undefined;
        levels?: LogLevel_Level[] | undefined;
        filter?: string | undefined;
        streamNames?: string[] | undefined;
        pageSize?: number | undefined;
        maxResponseSize?: number | undefined;
    } & {
        logGroupId?: string | undefined;
        resourceTypes?: (string[] & string[] & Record<Exclude<keyof I["resourceTypes"], keyof string[]>, never>) | undefined;
        resourceIds?: (string[] & string[] & Record<Exclude<keyof I["resourceIds"], keyof string[]>, never>) | undefined;
        since?: Date | undefined;
        until?: Date | undefined;
        levels?: (LogLevel_Level[] & LogLevel_Level[] & Record<Exclude<keyof I["levels"], keyof LogLevel_Level[]>, never>) | undefined;
        filter?: string | undefined;
        streamNames?: (string[] & string[] & Record<Exclude<keyof I["streamNames"], keyof string[]>, never>) | undefined;
        pageSize?: number | undefined;
        maxResponseSize?: number | undefined;
    } & Record<Exclude<keyof I, keyof Criteria>, never>>(object: I): Criteria;
};
/** A set of methods for reading from log groups. */
export declare const LogReadingServiceService: {
    /** Read log entries from the specified log group. */
    readonly read: {
        readonly path: "/yandex.cloud.logging.v1.LogReadingService/Read";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: ReadRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => ReadRequest;
        readonly responseSerialize: (value: ReadResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => ReadResponse;
    };
};
export interface LogReadingServiceServer extends UntypedServiceImplementation {
    /** Read log entries from the specified log group. */
    read: handleUnaryCall<ReadRequest, ReadResponse>;
}
export interface LogReadingServiceClient extends Client {
    /** Read log entries from the specified log group. */
    read(request: ReadRequest, callback: (error: ServiceError | null, response: ReadResponse) => void): ClientUnaryCall;
    read(request: ReadRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ReadResponse) => void): ClientUnaryCall;
    read(request: ReadRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ReadResponse) => void): ClientUnaryCall;
}
export declare const LogReadingServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): LogReadingServiceClient;
    service: typeof LogReadingServiceService;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
    [K in keyof P]: Exact<P[K], I[K]>;
} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;
export {};
