/// import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js'; import _m0 from 'protobufjs/minimal'; import { Key_Algorithm, Key } from '../../../../yandex/cloud/iam/v1/key'; import { FieldMask } from '../../../../google/protobuf/field_mask'; import { Operation } from '../../../../yandex/cloud/operation/operation'; export declare const protobufPackage = "yandex.cloud.iam.v1"; export declare enum KeyFormat { /** PEM_FILE - Privacy-Enhanced Mail (PEM) format. Default value. */ PEM_FILE = 0, UNRECOGNIZED = -1 } export declare function keyFormatFromJSON(object: any): KeyFormat; export declare function keyFormatToJSON(object: KeyFormat): string; export interface GetKeyRequest { /** * ID of the Key resource to return. * To get the ID use a [KeyService.List] request. */ keyId: string; /** Output format of the key. */ format: KeyFormat; } export interface ListKeysRequest { /** Output format of the key. */ format: KeyFormat; /** * ID of the service account to list key pairs for. * To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request. * If not specified, it defaults to the subject that made the request. */ serviceAccountId: 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 [ListKeysResponse.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 [page_token] to the * [ListKeysResponse.next_page_token] returned by a previous list request. */ pageToken: string; } export interface ListKeysResponse { /** List of Key resources. */ keys: Key[]; /** * This token allows you to get the next page of results for list requests. If the number of results * is larger than [ListKeysRequest.page_size], use * the [next_page_token] as the value * for the [ListKeysRequest.page_token] query 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 CreateKeyRequest { /** * ID of the service account to create a key pair for. * To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request. * If not specified, it defaults to the subject that made the request. */ serviceAccountId: string; /** Description of the key pair. */ description: string; /** Output format of the key. */ format: KeyFormat; /** An algorithm used to generate a key pair of the Key resource. */ keyAlgorithm: Key_Algorithm; } export interface CreateKeyResponse { /** Key resource. */ key?: Key; /** * A private key of the Key resource. * This key must be stored securely. */ privateKey: string; } export interface UpdateKeyRequest { /** * ID of the Key resource to update. * To get key pair ID, use a [KeyService.List] request. */ keyId: string; /** Field mask that specifies which fields of the Key resource are going to be updated. */ updateMask?: FieldMask; /** Description of the key pair. */ description: string; } export interface UpdateKeyMetadata { /** ID of the Key resource that is being updated. */ keyId: string; } export interface DeleteKeyRequest { /** * ID of the key to delete. * To get key ID use a [KeyService.List] request. */ keyId: string; } export interface DeleteKeyMetadata { /** ID of the key that is being deleted. */ keyId: string; } export interface ListKeyOperationsRequest { /** ID of the key to list operations for. */ keyId: 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 [ListKeyOperationsResponse.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 [page_token] to the * [ListKeyOperationsResponse.next_page_token] returned by a previous list request. */ pageToken: string; } export interface ListKeyOperationsResponse { /** List of operations for the specified key. */ operations: Operation[]; /** * This token allows you to get the next page of results for list requests. If the number of results * is larger than [ListKeyOperationsRequest.page_size], use the [next_page_token] as the value * for the [ListKeyOperationsRequest.page_token] query 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 declare const GetKeyRequest: { encode(message: GetKeyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetKeyRequest; fromJSON(object: any): GetKeyRequest; toJSON(message: GetKeyRequest): unknown; fromPartial, never>>(object: I): GetKeyRequest; }; export declare const ListKeysRequest: { encode(message: ListKeysRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListKeysRequest; fromJSON(object: any): ListKeysRequest; toJSON(message: ListKeysRequest): unknown; fromPartial, never>>(object: I): ListKeysRequest; }; export declare const ListKeysResponse: { encode(message: ListKeysResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListKeysResponse; fromJSON(object: any): ListKeysResponse; toJSON(message: ListKeysResponse): unknown; fromPartial, never>)[] & Record, never>) | undefined; nextPageToken?: string | undefined; } & Record, never>>(object: I): ListKeysResponse; }; export declare const CreateKeyRequest: { encode(message: CreateKeyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateKeyRequest; fromJSON(object: any): CreateKeyRequest; toJSON(message: CreateKeyRequest): unknown; fromPartial, never>>(object: I): CreateKeyRequest; }; export declare const CreateKeyResponse: { encode(message: CreateKeyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CreateKeyResponse; fromJSON(object: any): CreateKeyResponse; toJSON(message: CreateKeyResponse): unknown; fromPartial, never>) | undefined; privateKey?: string | undefined; } & Record, never>>(object: I): CreateKeyResponse; }; export declare const UpdateKeyRequest: { encode(message: UpdateKeyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateKeyRequest; fromJSON(object: any): UpdateKeyRequest; toJSON(message: UpdateKeyRequest): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; description?: string | undefined; } & Record, never>>(object: I): UpdateKeyRequest; }; export declare const UpdateKeyMetadata: { encode(message: UpdateKeyMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): UpdateKeyMetadata; fromJSON(object: any): UpdateKeyMetadata; toJSON(message: UpdateKeyMetadata): unknown; fromPartial, never>>(object: I): UpdateKeyMetadata; }; export declare const DeleteKeyRequest: { encode(message: DeleteKeyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteKeyRequest; fromJSON(object: any): DeleteKeyRequest; toJSON(message: DeleteKeyRequest): unknown; fromPartial, never>>(object: I): DeleteKeyRequest; }; export declare const DeleteKeyMetadata: { encode(message: DeleteKeyMetadata, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DeleteKeyMetadata; fromJSON(object: any): DeleteKeyMetadata; toJSON(message: DeleteKeyMetadata): unknown; fromPartial, never>>(object: I): DeleteKeyMetadata; }; export declare const ListKeyOperationsRequest: { encode(message: ListKeyOperationsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListKeyOperationsRequest; fromJSON(object: any): ListKeyOperationsRequest; toJSON(message: ListKeyOperationsRequest): unknown; fromPartial, never>>(object: I): ListKeyOperationsRequest; }; export declare const ListKeyOperationsResponse: { encode(message: ListKeyOperationsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ListKeyOperationsResponse; fromJSON(object: any): ListKeyOperationsResponse; toJSON(message: ListKeyOperationsResponse): 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): ListKeyOperationsResponse; }; /** A set of methods for managing Key resources. */ export declare const KeyServiceService: { /** * Returns the specified Key resource. * * To get the list of available Key resources, make a [List] request. */ readonly get: { readonly path: "/yandex.cloud.iam.v1.KeyService/Get"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: GetKeyRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => GetKeyRequest; readonly responseSerialize: (value: Key) => Buffer; readonly responseDeserialize: (value: Buffer) => Key; }; /** Retrieves the list of Key resources for the specified service account. */ readonly list: { readonly path: "/yandex.cloud.iam.v1.KeyService/List"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListKeysRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListKeysRequest; readonly responseSerialize: (value: ListKeysResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListKeysResponse; }; /** Creates a key pair for the specified service account. */ readonly create: { readonly path: "/yandex.cloud.iam.v1.KeyService/Create"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: CreateKeyRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => CreateKeyRequest; readonly responseSerialize: (value: CreateKeyResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => CreateKeyResponse; }; /** Updates the specified key pair. */ readonly update: { readonly path: "/yandex.cloud.iam.v1.KeyService/Update"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: UpdateKeyRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => UpdateKeyRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Deletes the specified key pair. */ readonly delete: { readonly path: "/yandex.cloud.iam.v1.KeyService/Delete"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: DeleteKeyRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => DeleteKeyRequest; readonly responseSerialize: (value: Operation) => Buffer; readonly responseDeserialize: (value: Buffer) => Operation; }; /** Lists operations for the specified key. */ readonly listOperations: { readonly path: "/yandex.cloud.iam.v1.KeyService/ListOperations"; readonly requestStream: false; readonly responseStream: false; readonly requestSerialize: (value: ListKeyOperationsRequest) => Buffer; readonly requestDeserialize: (value: Buffer) => ListKeyOperationsRequest; readonly responseSerialize: (value: ListKeyOperationsResponse) => Buffer; readonly responseDeserialize: (value: Buffer) => ListKeyOperationsResponse; }; }; export interface KeyServiceServer extends UntypedServiceImplementation { /** * Returns the specified Key resource. * * To get the list of available Key resources, make a [List] request. */ get: handleUnaryCall; /** Retrieves the list of Key resources for the specified service account. */ list: handleUnaryCall; /** Creates a key pair for the specified service account. */ create: handleUnaryCall; /** Updates the specified key pair. */ update: handleUnaryCall; /** Deletes the specified key pair. */ delete: handleUnaryCall; /** Lists operations for the specified key. */ listOperations: handleUnaryCall; } export interface KeyServiceClient extends Client { /** * Returns the specified Key resource. * * To get the list of available Key resources, make a [List] request. */ get(request: GetKeyRequest, callback: (error: ServiceError | null, response: Key) => void): ClientUnaryCall; get(request: GetKeyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Key) => void): ClientUnaryCall; get(request: GetKeyRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Key) => void): ClientUnaryCall; /** Retrieves the list of Key resources for the specified service account. */ list(request: ListKeysRequest, callback: (error: ServiceError | null, response: ListKeysResponse) => void): ClientUnaryCall; list(request: ListKeysRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListKeysResponse) => void): ClientUnaryCall; list(request: ListKeysRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListKeysResponse) => void): ClientUnaryCall; /** Creates a key pair for the specified service account. */ create(request: CreateKeyRequest, callback: (error: ServiceError | null, response: CreateKeyResponse) => void): ClientUnaryCall; create(request: CreateKeyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CreateKeyResponse) => void): ClientUnaryCall; create(request: CreateKeyRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: CreateKeyResponse) => void): ClientUnaryCall; /** Updates the specified key pair. */ update(request: UpdateKeyRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateKeyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; update(request: UpdateKeyRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Deletes the specified key pair. */ delete(request: DeleteKeyRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteKeyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; delete(request: DeleteKeyRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall; /** Lists operations for the specified key. */ listOperations(request: ListKeyOperationsRequest, callback: (error: ServiceError | null, response: ListKeyOperationsResponse) => void): ClientUnaryCall; listOperations(request: ListKeyOperationsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListKeyOperationsResponse) => void): ClientUnaryCall; listOperations(request: ListKeyOperationsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListKeyOperationsResponse) => void): ClientUnaryCall; } export declare const KeyServiceClient: { new (address: string, credentials: ChannelCredentials, options?: Partial): KeyServiceClient; service: typeof KeyServiceService; }; 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 {};