/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, handleServerStreamingCall, Client, ClientUnaryCall, Metadata, CallOptions, ClientReadableStream, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
import { Author, MessageContent, Message } from '../../../../../../yandex/cloud/ai/assistants/v1/threads/message';
export declare const protobufPackage = "yandex.cloud.ai.assistants.v1.threads";
/** Request to create a new message in a specific thread. */
export interface CreateMessageRequest {
    /** ID of the thread to which the message will be added. */
    threadId: string;
    /**
     * Author of the message, containing details about the message's creator.
     * If not provided, the default author ID specified in the corresponding thread will be used.
     */
    author?: Author;
    /** Set of key-value pairs to label the message. */
    labels: {
        [key: string]: string;
    };
    /** Content of the message. */
    content?: MessageContent;
}
export interface CreateMessageRequest_LabelsEntry {
    key: string;
    value: string;
}
/** Request message for retrieving a message from a thread. */
export interface GetMessageRequest {
    /** ID of the thread that contains the message. */
    threadId: string;
    /** ID of the message to retrieve. */
    messageId: string;
}
/** Request message for listing messages in a specific thread. */
export interface ListMessagesRequest {
    /** ID of the thread whose messages will be listed. */
    threadId: string;
}
export declare const CreateMessageRequest: {
    encode(message: CreateMessageRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): CreateMessageRequest;
    fromJSON(object: any): CreateMessageRequest;
    toJSON(message: CreateMessageRequest): unknown;
    fromPartial<I extends {
        threadId?: string | undefined;
        author?: {
            id?: string | undefined;
            role?: string | undefined;
        } | undefined;
        labels?: {
            [x: string]: string | undefined;
        } | undefined;
        content?: {
            content?: {
                text?: {
                    content?: string | undefined;
                } | undefined;
            }[] | undefined;
        } | undefined;
    } & {
        threadId?: string | undefined;
        author?: ({
            id?: string | undefined;
            role?: string | undefined;
        } & {
            id?: string | undefined;
            role?: string | undefined;
        } & Record<Exclude<keyof I["author"], keyof Author>, never>) | undefined;
        labels?: ({
            [x: string]: string | undefined;
        } & {
            [x: string]: string | undefined;
        } & Record<Exclude<keyof I["labels"], string | number>, never>) | undefined;
        content?: ({
            content?: {
                text?: {
                    content?: string | undefined;
                } | undefined;
            }[] | undefined;
        } & {
            content?: ({
                text?: {
                    content?: string | undefined;
                } | undefined;
            }[] & ({
                text?: {
                    content?: string | undefined;
                } | undefined;
            } & {
                text?: ({
                    content?: string | undefined;
                } & {
                    content?: string | undefined;
                } & Record<Exclude<keyof I["content"]["content"][number]["text"], "content">, never>) | undefined;
            } & Record<Exclude<keyof I["content"]["content"][number], "text">, never>)[] & Record<Exclude<keyof I["content"]["content"], keyof {
                text?: {
                    content?: string | undefined;
                } | undefined;
            }[]>, never>) | undefined;
        } & Record<Exclude<keyof I["content"], "content">, never>) | undefined;
    } & Record<Exclude<keyof I, keyof CreateMessageRequest>, never>>(object: I): CreateMessageRequest;
};
export declare const CreateMessageRequest_LabelsEntry: {
    encode(message: CreateMessageRequest_LabelsEntry, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): CreateMessageRequest_LabelsEntry;
    fromJSON(object: any): CreateMessageRequest_LabelsEntry;
    toJSON(message: CreateMessageRequest_LabelsEntry): unknown;
    fromPartial<I extends {
        key?: string | undefined;
        value?: string | undefined;
    } & {
        key?: string | undefined;
        value?: string | undefined;
    } & Record<Exclude<keyof I, keyof CreateMessageRequest_LabelsEntry>, never>>(object: I): CreateMessageRequest_LabelsEntry;
};
export declare const GetMessageRequest: {
    encode(message: GetMessageRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GetMessageRequest;
    fromJSON(object: any): GetMessageRequest;
    toJSON(message: GetMessageRequest): unknown;
    fromPartial<I extends {
        threadId?: string | undefined;
        messageId?: string | undefined;
    } & {
        threadId?: string | undefined;
        messageId?: string | undefined;
    } & Record<Exclude<keyof I, keyof GetMessageRequest>, never>>(object: I): GetMessageRequest;
};
export declare const ListMessagesRequest: {
    encode(message: ListMessagesRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListMessagesRequest;
    fromJSON(object: any): ListMessagesRequest;
    toJSON(message: ListMessagesRequest): unknown;
    fromPartial<I extends {
        threadId?: string | undefined;
    } & {
        threadId?: string | undefined;
    } & Record<Exclude<keyof I, "threadId">, never>>(object: I): ListMessagesRequest;
};
/** MessageService provides operations for managing messages. */
export declare const MessageServiceService: {
    /** Create a new message. */
    readonly create: {
        readonly path: "/yandex.cloud.ai.assistants.v1.threads.MessageService/Create";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: CreateMessageRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => CreateMessageRequest;
        readonly responseSerialize: (value: Message) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Message;
    };
    /** Retrieve details of a specific message by its ID. */
    readonly get: {
        readonly path: "/yandex.cloud.ai.assistants.v1.threads.MessageService/Get";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: GetMessageRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => GetMessageRequest;
        readonly responseSerialize: (value: Message) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Message;
    };
    /**
     * List messages in a specific thread.
     * By default, messages are listed in reverse chronological order, i.e., from the newest to the oldest.
     */
    readonly list: {
        readonly path: "/yandex.cloud.ai.assistants.v1.threads.MessageService/List";
        readonly requestStream: false;
        readonly responseStream: true;
        readonly requestSerialize: (value: ListMessagesRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => ListMessagesRequest;
        readonly responseSerialize: (value: Message) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Message;
    };
};
export interface MessageServiceServer extends UntypedServiceImplementation {
    /** Create a new message. */
    create: handleUnaryCall<CreateMessageRequest, Message>;
    /** Retrieve details of a specific message by its ID. */
    get: handleUnaryCall<GetMessageRequest, Message>;
    /**
     * List messages in a specific thread.
     * By default, messages are listed in reverse chronological order, i.e., from the newest to the oldest.
     */
    list: handleServerStreamingCall<ListMessagesRequest, Message>;
}
export interface MessageServiceClient extends Client {
    /** Create a new message. */
    create(request: CreateMessageRequest, callback: (error: ServiceError | null, response: Message) => void): ClientUnaryCall;
    create(request: CreateMessageRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Message) => void): ClientUnaryCall;
    create(request: CreateMessageRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Message) => void): ClientUnaryCall;
    /** Retrieve details of a specific message by its ID. */
    get(request: GetMessageRequest, callback: (error: ServiceError | null, response: Message) => void): ClientUnaryCall;
    get(request: GetMessageRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Message) => void): ClientUnaryCall;
    get(request: GetMessageRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Message) => void): ClientUnaryCall;
    /**
     * List messages in a specific thread.
     * By default, messages are listed in reverse chronological order, i.e., from the newest to the oldest.
     */
    list(request: ListMessagesRequest, options?: Partial<CallOptions>): ClientReadableStream<Message>;
    list(request: ListMessagesRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<Message>;
}
export declare const MessageServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): MessageServiceClient;
    service: typeof MessageServiceService;
};
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 {};
