/// import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js'; import _m0 from 'protobufjs/minimal'; import { Target, Proxy } from '../../../../../yandex/cloud/serverless/mdbproxy/v1/proxy'; import { FieldMask } from '../../../../../google/protobuf/field_mask'; import { Operation } from '../../../../../yandex/cloud/operation/operation'; import { ListAccessBindingsRequest, ListAccessBindingsResponse, SetAccessBindingsRequest, UpdateAccessBindingsRequest } from '../../../../../yandex/cloud/access/access'; export declare const protobufPackage = "yandex.cloud.serverless.mdbproxy.v1"; export interface GetProxyRequest { /** * ID of the proxy to return. * * To get a proxy ID make a [ProxyService.List] request. */ proxyId: string; } export interface ListProxyRequest { /** * ID of the folder to list proxies in. * * To get a folder ID make a [yandex.cloud.resourcemanager.v1.FolderService.List] request. */ folderId: string; /** * The maximum number of results per page to return. If the number of available * results is larger than `pageSize`, the service returns a [ListProxyResponse.next_page_token] * that can be used to get the next page of results in subsequent list requests. * * Default value: 100. */ pageSize: number; /** * Page token. To get the next page of results, set `pageToken` to the * [ListProxyResponse.next_page_token] returned by a previous list request. */ pageToken: string; /** * A filter expression that filters proxies listed in the response. * * The expression must specify: * 1. The field name. Currently filtering can only be applied to the [Proxy.name] field. * 2. An `=` operator. * 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `[a-z][-a-z0-9]{1,61}[a-z0-9]`. * Example of a filter: `name=my-proxy`. */ filter: string; } export interface ListProxyResponse { /** List of proxies in the specified folder. */ proxies: Proxy[]; /** * Token for getting the next page of the list. If the number of results is greater than * the specified [ListProxyRequest.page_size], use `nextPageToken` as the value * for the [ListProxyRequest.page_token] parameter in the next list request. * * Each subsequent page will have its own `nextPageToken` to continue paging through the results. */ nextPageToken: string; } export interface CreateProxyRequest { /** * ID of the folder to create a proxy in. * * To get a folder ID make a [yandex.cloud.resourcemanager.v1.FolderService.List] request. */ folderId: string; /** * Name of the proxy. * The name must be unique within the folder. */ name: string; /** Description of the proxy. */ description: string; /** Resource labels as `key:value` pairs. */ labels: { [key: string]: string; }; /** Proxy target. */ target?: Target; } export interface CreateProxyRequest_LabelsEntry { key: string; value: string; } export interface CreateProxyMetadata { /** ID of the proxy. */ proxyId: string; } export interface UpdateProxyRequest { /** ID of the proxy to update. */ proxyId: string; /** Field mask that specifies which attributes of the proxy should be updated. */ updateMask?: FieldMask; /** * New name for the proxy. * The name must be unique within the folder. */ name: string; /** New description for the proxy. */ description: string; /** Proxy labels as `key:value` pairs. */ labels: { [key: string]: string; }; /** Proxy target. */ target?: Target; } export interface UpdateProxyRequest_LabelsEntry { key: string; value: string; } export interface UpdateProxyMetadata { /** ID of the proxy. */ proxyId: string; } export interface DeleteProxyRequest { /** ID of the proxy. */ proxyId: string; } export interface DeleteProxyMetadata { /** ID of the proxy. */ proxyId: string; } export interface ListProxyOperationsRequest { /** ID of the proxy to list operations for. */ proxyId: string; /** * The maximum number of results per page that should be returned. If the number of available * results is larger than `pageSize`, the service returns a [ListProxyOperationsResponse.next_page_token] * that can be used to get the next page of results in subsequent list requests. * * Default value: 100. */ pageSize: number; /** * Page token. To get the next page of results, set `pageToken` to the * [ListProxyOperationsResponse.next_page_token] returned by a previous list request. */ pageToken: string; /** * A filter expression that filters resources listed in the response. * * The expression must specify: * 1. The field name. Currently filtering can be applied to the [operation.Operation.done], [operation.Operation.created_by] field. * 2. An `=` operator. * 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `[a-z][-a-z0-9]{1,61}[a-z0-9]`. * Examples of a filter: `done=false`, `created_by='John.Doe'`. */ filter: string; } export interface ListProxyOperationsResponse { /** List of operations for the specified proxy. */ operations: Operation[]; /** * Token for getting the next page of the list. If the number of results is greater than * the specified [ListProxyOperationsRequest.page_size], use `nextPageToken` as the value * for the [ListProxyOperationsRequest.page_token] parameter in the next list request. * * Each subsequent page will have its own `nextPageToken` to continue paging through the results. */ nextPageToken: string; } export declare const GetProxyRequest: { encode(message: GetProxyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetProxyRequest; fromJSON(object: any): GetProxyRequest; toJSON(message: GetProxyRequest): unknown; fromPartial, never>>(object: I): GetProxyRequest; }; export declare const ListProxyRequest: { encode(message: ListProxyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListProxyRequest; fromJSON(object: any): ListProxyRequest; toJSON(message: ListProxyRequest): unknown; fromPartial, never>>(object: I): ListProxyRequest; }; export declare const ListProxyResponse: { encode(message: ListProxyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListProxyResponse; fromJSON(object: any): ListProxyResponse; toJSON(message: ListProxyResponse): unknown; fromPartial, never>) | undefined; target?: ({ clickhouse?: { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } | undefined; postgresql?: { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } | undefined; } & { clickhouse?: ({ clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & Record, never>) | undefined; postgresql?: ({ clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; nextPageToken?: string | undefined; } & Record, never>>(object: I): ListProxyResponse; }; export declare const CreateProxyRequest: { encode(message: CreateProxyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateProxyRequest; fromJSON(object: any): CreateProxyRequest; toJSON(message: CreateProxyRequest): unknown; fromPartial, never>) | undefined; target?: ({ clickhouse?: { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } | undefined; postgresql?: { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } | undefined; } & { clickhouse?: ({ clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & Record, never>) | undefined; postgresql?: ({ clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): CreateProxyRequest; }; export declare const CreateProxyRequest_LabelsEntry: { encode(message: CreateProxyRequest_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateProxyRequest_LabelsEntry; fromJSON(object: any): CreateProxyRequest_LabelsEntry; toJSON(message: CreateProxyRequest_LabelsEntry): unknown; fromPartial, never>>(object: I): CreateProxyRequest_LabelsEntry; }; export declare const CreateProxyMetadata: { encode(message: CreateProxyMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateProxyMetadata; fromJSON(object: any): CreateProxyMetadata; toJSON(message: CreateProxyMetadata): unknown; fromPartial, never>>(object: I): CreateProxyMetadata; }; export declare const UpdateProxyRequest: { encode(message: UpdateProxyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateProxyRequest; fromJSON(object: any): UpdateProxyRequest; toJSON(message: UpdateProxyRequest): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; name?: string | undefined; description?: string | undefined; labels?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; target?: ({ clickhouse?: { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } | undefined; postgresql?: { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } | undefined; } & { clickhouse?: ({ clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & Record, never>) | undefined; postgresql?: ({ clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & { clusterId?: string | undefined; user?: string | undefined; password?: string | undefined; db?: string | undefined; endpoint?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): UpdateProxyRequest; }; export declare const UpdateProxyRequest_LabelsEntry: { encode(message: UpdateProxyRequest_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateProxyRequest_LabelsEntry; fromJSON(object: any): UpdateProxyRequest_LabelsEntry; toJSON(message: UpdateProxyRequest_LabelsEntry): unknown; fromPartial, never>>(object: I): UpdateProxyRequest_LabelsEntry; }; export declare const UpdateProxyMetadata: { encode(message: UpdateProxyMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateProxyMetadata; fromJSON(object: any): UpdateProxyMetadata; toJSON(message: UpdateProxyMetadata): unknown; fromPartial, never>>(object: I): UpdateProxyMetadata; }; export declare const DeleteProxyRequest: { encode(message: DeleteProxyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteProxyRequest; fromJSON(object: any): DeleteProxyRequest; toJSON(message: DeleteProxyRequest): unknown; fromPartial, never>>(object: I): DeleteProxyRequest; }; export declare const DeleteProxyMetadata: { encode(message: DeleteProxyMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteProxyMetadata; fromJSON(object: any): DeleteProxyMetadata; toJSON(message: DeleteProxyMetadata): unknown; fromPartial, never>>(object: I): DeleteProxyMetadata; }; export declare const ListProxyOperationsRequest: { encode(message: ListProxyOperationsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListProxyOperationsRequest; fromJSON(object: any): ListProxyOperationsRequest; toJSON(message: ListProxyOperationsRequest): unknown; fromPartial, never>>(object: I): ListProxyOperationsRequest; }; export declare const ListProxyOperationsResponse: { encode(message: ListProxyOperationsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListProxyOperationsResponse; fromJSON(object: any): ListProxyOperationsResponse; toJSON(message: ListProxyOperationsResponse): unknown; fromPartial, never>) | undefined; error?: ({ code?: number | undefined; message?: string | undefined; details?: { typeUrl?: string | undefined; value?: Buffer | undefined; }[] | undefined; } & { code?: number | undefined; message?: string | undefined; details?: ({ typeUrl?: string | undefined; value?: Buffer | undefined; }[] & ({ typeUrl?: string | undefined; value?: Buffer | undefined; } & { typeUrl?: string | undefined; value?: Buffer | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>) | undefined; response?: ({ typeUrl?: string | undefined; value?: Buffer | undefined; } & { typeUrl?: string | undefined; value?: Buffer | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; nextPageToken?: string | undefined; } & Record, never>>(object: I): ListProxyOperationsResponse; }; /** A set of methods for managing serverless MDB proxy. */ export declare const ProxyServiceService: { /** * Returns the specified proxy. * * To get the list of all available proxies, make a [List] request. */ readonly get: { readonly path: "/yandex.cloud.serverless.mdbproxy.v1.ProxyService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetProxyRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetProxyRequest; readonly responseSerialize: (value: Proxy) => Buffer; readonly responseDeserialize: (value: Buffer) => Proxy; }; /** Retrieves the list of proxies in the specified folder. */ readonly list: { readonly path: "/yandex.cloud.serverless.mdbproxy.v1.ProxyService/List"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListProxyRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListProxyRequest; readonly responseSerialize: (value: ListProxyResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListProxyResponse; }; /** Creates a proxy in the specified folder. */ readonly create: { readonly path: "/yandex.cloud.serverless.mdbproxy.v1.ProxyService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateProxyRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CreateProxyRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Updates the specified proxy. */ readonly update: { readonly path: "/yandex.cloud.serverless.mdbproxy.v1.ProxyService/Update"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateProxyRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateProxyRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Deletes the specified proxy. */ readonly delete: { readonly path: "/yandex.cloud.serverless.mdbproxy.v1.ProxyService/Delete"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DeleteProxyRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => DeleteProxyRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Lists operations for the specified proxy. */ readonly listOperations: { readonly path: "/yandex.cloud.serverless.mdbproxy.v1.ProxyService/ListOperations"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListProxyOperationsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListProxyOperationsRequest; readonly responseSerialize: (value: ListProxyOperationsResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListProxyOperationsResponse; }; /** Lists existing access bindings for the specified proxy. */ readonly listAccessBindings: { readonly path: "/yandex.cloud.serverless.mdbproxy.v1.ProxyService/ListAccessBindings"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListAccessBindingsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListAccessBindingsRequest; readonly responseSerialize: (value: ListAccessBindingsResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListAccessBindingsResponse; }; /** Sets access bindings for the proxy. */ readonly setAccessBindings: { readonly path: "/yandex.cloud.serverless.mdbproxy.v1.ProxyService/SetAccessBindings"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: SetAccessBindingsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => SetAccessBindingsRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Updates access bindings for the specified proxy. */ readonly updateAccessBindings: { readonly path: "/yandex.cloud.serverless.mdbproxy.v1.ProxyService/UpdateAccessBindings"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateAccessBindingsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateAccessBindingsRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; }; export interface ProxyServiceServer extends UntypedServiceImplementation { /** * Returns the specified proxy. * * To get the list of all available proxies, make a [List] request. */ get: handleUnaryCall; /** Retrieves the list of proxies in the specified folder. */ list: handleUnaryCall; /** Creates a proxy in the specified folder. */ create: handleUnaryCall; /** Updates the specified proxy. */ update: handleUnaryCall; /** Deletes the specified proxy. */ delete: handleUnaryCall; /** Lists operations for the specified proxy. */ listOperations: handleUnaryCall; /** Lists existing access bindings for the specified proxy. */ listAccessBindings: handleUnaryCall; /** Sets access bindings for the proxy. */ setAccessBindings: handleUnaryCall; /** Updates access bindings for the specified proxy. */ updateAccessBindings: handleUnaryCall; } export interface ProxyServiceClient extends Client { /** * Returns the specified proxy. * * To get the list of all available proxies, make a [List] request. */ get(request: GetProxyRequest, callback: (error: ServiceError | null, response: Proxy) => void): ClientUnaryCall; get(request: GetProxyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Proxy) => void): ClientUnaryCall; get(request: GetProxyRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Proxy) => void): ClientUnaryCall; /** Retrieves the list of proxies in the specified folder. */ list(request: ListProxyRequest, callback: (error: ServiceError | null, response: ListProxyResponse) => void): ClientUnaryCall; list(request: ListProxyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListProxyResponse) => void): ClientUnaryCall; list(request: ListProxyRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListProxyResponse) => void): ClientUnaryCall; /** Creates a proxy in the specified folder. */ create(request: CreateProxyRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateProxyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateProxyRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Updates the specified proxy. */ update(request: UpdateProxyRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateProxyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateProxyRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Deletes the specified proxy. */ delete(request: DeleteProxyRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteProxyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteProxyRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Lists operations for the specified proxy. */ listOperations(request: ListProxyOperationsRequest, callback: (error: ServiceError | null, response: ListProxyOperationsResponse) => void): ClientUnaryCall; listOperations(request: ListProxyOperationsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListProxyOperationsResponse) => void): ClientUnaryCall; listOperations(request: ListProxyOperationsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListProxyOperationsResponse) => void): ClientUnaryCall; /** Lists existing access bindings for the specified proxy. */ listAccessBindings(request: ListAccessBindingsRequest, callback: (error: ServiceError | null, response: ListAccessBindingsResponse) => void): ClientUnaryCall; listAccessBindings(request: ListAccessBindingsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListAccessBindingsResponse) => void): ClientUnaryCall; listAccessBindings(request: ListAccessBindingsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListAccessBindingsResponse) => void): ClientUnaryCall; /** Sets access bindings for the proxy. */ setAccessBindings(request: SetAccessBindingsRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; setAccessBindings(request: SetAccessBindingsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; setAccessBindings(request: SetAccessBindingsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Updates access bindings for the specified proxy. */ updateAccessBindings(request: UpdateAccessBindingsRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; updateAccessBindings(request: UpdateAccessBindingsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; updateAccessBindings(request: UpdateAccessBindingsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; } export declare const ProxyServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): ProxyServiceClient; service: typeof ProxyServiceService; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & Record>, never>; export {};
= P extends Builtin ? P : P & { [K in keyof P]: Exact
; } & Record>, never>; export {};