/// import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js'; import _m0 from 'protobufjs/minimal'; import { UserSpec, User } from '../../../../../yandex/cloud/mdb/elasticsearch/v1/user'; import { FieldMask } from '../../../../../google/protobuf/field_mask'; import { Operation } from '../../../../../yandex/cloud/operation/operation'; export declare const protobufPackage = "yandex.cloud.mdb.elasticsearch.v1"; export interface GetUserRequest { /** * ID of the Elasticsearch cluster the user belongs to. * * To get the cluster ID, make a [ClusterService.List] request. */ clusterId: string; /** * Name of the Elasticsearch user to return. * * To get the name of the user, make a [UserService.List] request. */ userName: string; } export interface ListUsersRequest { /** * ID of the Elasticsearch cluster to list Elasticsearch users in. * * To get the cluster ID, use a [ClusterService.List] request. */ clusterId: string; /** * The maximum number of results per page to return. * * If the number of available results is larger than `page_size`, the service returns a [ListUsersResponse.next_page_token] that can be used to get the next page of results in subsequent list requests. */ pageSize: number; /** * Page token. * * To get the next page of results, set `page_token` to the [ListUsersResponse.next_page_token] returned by the previous list request. */ pageToken: string; } export interface ListUsersResponse { /** List of Elasticsearch users. */ users: User[]; /** * This token allows you to get the next page of results for list requests. * * If the number of results is larger than [ListUsersRequest.page_size], use the `next_page_token` as the value for the [ListUsersRequest.page_token] parameter in the next list request. * Each subsequent list request will have its own `next_page_token` to continue paging through the results. */ nextPageToken: string; } export interface CreateUserRequest { /** * ID of the Elasticsearch cluster to create a user in. * * To get the cluster ID, make a [ClusterService.List] request. */ clusterId: string; /** Configuration of the user to create. */ userSpec?: UserSpec; } export interface CreateUserMetadata { /** ID of the Elasticsearch cluster the user is being created in. */ clusterId: string; /** Name of the user that is being created. */ userName: string; } export interface UpdateUserRequest { /** * ID of the Elasticsearch cluster the user belongs to. * * To get the cluster ID, make a [ClusterService.List] request. */ clusterId: string; /** * Name of the user to be updated. * * To get the name of the user, make a [UserService.List] request. */ userName: string; updateMask?: FieldMask; /** New password for the user. */ password: string; } export interface UpdateUserMetadata { /** ID of the Elasticsearch cluster the user belongs to. */ clusterId: string; /** Name of the user that is being updated. */ userName: string; } export interface DeleteUserRequest { /** * ID of the Elasticsearch cluster the user belongs to. * * To get the cluster ID, make a [ClusterService.List] request. */ clusterId: string; /** * Name of the user to delete. * * To get the name of the user, make a [UserService.List] request. */ userName: string; } export interface DeleteUserMetadata { /** ID of the Elasticsearch cluster the user belongs to. */ clusterId: string; /** Name of the user that is being deleted. */ userName: string; } export declare const GetUserRequest: { encode(message: GetUserRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetUserRequest; fromJSON(object: any): GetUserRequest; toJSON(message: GetUserRequest): unknown; fromPartial, never>>(object: I): GetUserRequest; }; export declare const ListUsersRequest: { encode(message: ListUsersRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListUsersRequest; fromJSON(object: any): ListUsersRequest; toJSON(message: ListUsersRequest): unknown; fromPartial, never>>(object: I): ListUsersRequest; }; export declare const ListUsersResponse: { encode(message: ListUsersResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListUsersResponse; fromJSON(object: any): ListUsersResponse; toJSON(message: ListUsersResponse): unknown; fromPartial, never>)[] & Record, never>) | undefined; nextPageToken?: string | undefined; } & Record, never>>(object: I): ListUsersResponse; }; export declare const CreateUserRequest: { encode(message: CreateUserRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateUserRequest; fromJSON(object: any): CreateUserRequest; toJSON(message: CreateUserRequest): unknown; fromPartial, never>) | undefined; } & Record, never>>(object: I): CreateUserRequest; }; export declare const CreateUserMetadata: { encode(message: CreateUserMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateUserMetadata; fromJSON(object: any): CreateUserMetadata; toJSON(message: CreateUserMetadata): unknown; fromPartial, never>>(object: I): CreateUserMetadata; }; export declare const UpdateUserRequest: { encode(message: UpdateUserRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserRequest; fromJSON(object: any): UpdateUserRequest; toJSON(message: UpdateUserRequest): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; password?: string | undefined; } & Record, never>>(object: I): UpdateUserRequest; }; export declare const UpdateUserMetadata: { encode(message: UpdateUserMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserMetadata; fromJSON(object: any): UpdateUserMetadata; toJSON(message: UpdateUserMetadata): unknown; fromPartial, never>>(object: I): UpdateUserMetadata; }; export declare const DeleteUserRequest: { encode(message: DeleteUserRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteUserRequest; fromJSON(object: any): DeleteUserRequest; toJSON(message: DeleteUserRequest): unknown; fromPartial, never>>(object: I): DeleteUserRequest; }; export declare const DeleteUserMetadata: { encode(message: DeleteUserMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteUserMetadata; fromJSON(object: any): DeleteUserMetadata; toJSON(message: DeleteUserMetadata): unknown; fromPartial, never>>(object: I): DeleteUserMetadata; }; /** A set of methods for managing Elasticsearch users. */ export declare const UserServiceService: { /** * Returns the specified Elasticsearch user. * * To get the list of available Elasticsearch users, make a [List] request. */ readonly get: { readonly path: "/yandex.cloud.mdb.elasticsearch.v1.UserService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetUserRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetUserRequest; readonly responseSerialize: (value: User) => Buffer; readonly responseDeserialize: (value: Buffer) => User; }; /** Retrieves the list of Elasticsearch users in the specified cluster. */ readonly list: { readonly path: "/yandex.cloud.mdb.elasticsearch.v1.UserService/List"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListUsersRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListUsersRequest; readonly responseSerialize: (value: ListUsersResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListUsersResponse; }; /** Creates a user in the specified cluster. */ readonly create: { readonly path: "/yandex.cloud.mdb.elasticsearch.v1.UserService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateUserRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CreateUserRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Updates the specified user. */ readonly update: { readonly path: "/yandex.cloud.mdb.elasticsearch.v1.UserService/Update"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateUserRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateUserRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Deletes the specified user. */ readonly delete: { readonly path: "/yandex.cloud.mdb.elasticsearch.v1.UserService/Delete"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DeleteUserRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => DeleteUserRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; }; export interface UserServiceServer extends UntypedServiceImplementation { /** * Returns the specified Elasticsearch user. * * To get the list of available Elasticsearch users, make a [List] request. */ get: handleUnaryCall; /** Retrieves the list of Elasticsearch users in the specified cluster. */ list: handleUnaryCall; /** Creates a user in the specified cluster. */ create: handleUnaryCall; /** Updates the specified user. */ update: handleUnaryCall; /** Deletes the specified user. */ delete: handleUnaryCall; } export interface UserServiceClient extends Client { /** * Returns the specified Elasticsearch user. * * To get the list of available Elasticsearch users, make a [List] request. */ get(request: GetUserRequest, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; get(request: GetUserRequest, metadata: Metadata, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; get(request: GetUserRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: User) => void): ClientUnaryCall; /** Retrieves the list of Elasticsearch users in the specified cluster. */ list(request: ListUsersRequest, callback: (error: ServiceError | null, response: ListUsersResponse) => void): ClientUnaryCall; list(request: ListUsersRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListUsersResponse) => void): ClientUnaryCall; list(request: ListUsersRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListUsersResponse) => void): ClientUnaryCall; /** Creates a user in the specified cluster. */ create(request: CreateUserRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateUserRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; create(request: CreateUserRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Updates the specified user. */ update(request: UpdateUserRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateUserRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateUserRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Deletes the specified user. */ delete(request: DeleteUserRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteUserRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteUserRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; } export declare const UserServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): UserServiceClient; service: typeof UserServiceService; }; 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 {};