/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
import { Operation } from '../../../../../../yandex/cloud/operation/operation';
import { Lock } from '../../../../../../yandex/cloud/marketplace/licensemanager/v1/lock';
export declare const protobufPackage = "yandex.cloud.marketplace.licensemanager.saas.v1";
export interface EnsureLockRequest {
    /** Signed JWT token which contains information about subscription. */
    instanceToken: string;
    /** ID of the resource to which the subscription will be locked. */
    resourceId: string;
}
export interface EnsureLockMetadata {
    /** ID of the subscription lock. */
    lockId: string;
}
export interface GetLockRequest {
    /** ID of the subscription lock. */
    lockId: string;
}
export declare const EnsureLockRequest: {
    encode(message: EnsureLockRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): EnsureLockRequest;
    fromJSON(object: any): EnsureLockRequest;
    toJSON(message: EnsureLockRequest): unknown;
    fromPartial<I extends {
        instanceToken?: string | undefined;
        resourceId?: string | undefined;
    } & {
        instanceToken?: string | undefined;
        resourceId?: string | undefined;
    } & Record<Exclude<keyof I, keyof EnsureLockRequest>, never>>(object: I): EnsureLockRequest;
};
export declare const EnsureLockMetadata: {
    encode(message: EnsureLockMetadata, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): EnsureLockMetadata;
    fromJSON(object: any): EnsureLockMetadata;
    toJSON(message: EnsureLockMetadata): unknown;
    fromPartial<I extends {
        lockId?: string | undefined;
    } & {
        lockId?: string | undefined;
    } & Record<Exclude<keyof I, "lockId">, never>>(object: I): EnsureLockMetadata;
};
export declare const GetLockRequest: {
    encode(message: GetLockRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GetLockRequest;
    fromJSON(object: any): GetLockRequest;
    toJSON(message: GetLockRequest): unknown;
    fromPartial<I extends {
        lockId?: string | undefined;
    } & {
        lockId?: string | undefined;
    } & Record<Exclude<keyof I, "lockId">, never>>(object: I): GetLockRequest;
};
/** A set of methods for managing subscription locks. */
export declare const LockServiceService: {
    /**
     * Checks if the she specified subscription is already locked to the specified resource.
     * If it is not locked, locks the subscription to the resource.
     */
    readonly ensure: {
        readonly path: "/yandex.cloud.marketplace.licensemanager.saas.v1.LockService/Ensure";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: EnsureLockRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => EnsureLockRequest;
        readonly responseSerialize: (value: Operation) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Operation;
    };
    /** Returns the specified subscription lock. */
    readonly get: {
        readonly path: "/yandex.cloud.marketplace.licensemanager.saas.v1.LockService/Get";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: GetLockRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => GetLockRequest;
        readonly responseSerialize: (value: Lock) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Lock;
    };
};
export interface LockServiceServer extends UntypedServiceImplementation {
    /**
     * Checks if the she specified subscription is already locked to the specified resource.
     * If it is not locked, locks the subscription to the resource.
     */
    ensure: handleUnaryCall<EnsureLockRequest, Operation>;
    /** Returns the specified subscription lock. */
    get: handleUnaryCall<GetLockRequest, Lock>;
}
export interface LockServiceClient extends Client {
    /**
     * Checks if the she specified subscription is already locked to the specified resource.
     * If it is not locked, locks the subscription to the resource.
     */
    ensure(request: EnsureLockRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    ensure(request: EnsureLockRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    ensure(request: EnsureLockRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    /** Returns the specified subscription lock. */
    get(request: GetLockRequest, callback: (error: ServiceError | null, response: Lock) => void): ClientUnaryCall;
    get(request: GetLockRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Lock) => void): ClientUnaryCall;
    get(request: GetLockRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Lock) => void): ClientUnaryCall;
}
export declare const LockServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): LockServiceClient;
    service: typeof LockServiceService;
};
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 {};
