/// <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';
export declare const protobufPackage = "yandex.cloud.cdn.v1";
export interface PurgeCacheRequest {
    /** ID of the resource to perform purge operation on. */
    resourceId: string;
    /**
     * Set of paths:
     * Paths of the files to remove from the cache.
     *
     * You may use asterisk (`*`) as a wildcard character that substitutes any number of characters.
     *
     * If an empty array of paths is specified (`"paths": []`), the cache is purged entirely.
     */
    paths: string[];
}
export interface PurgeCacheMetadata {
    /** ID of the resource. */
    resourceId: string;
}
export interface PrefetchCacheRequest {
    /** ID of the resource to perform prefetch operation on. */
    resourceId: string;
    /** Set of paths to prefetch. */
    paths: string[];
}
export interface PrefetchCacheMetadata {
    /** ID of the resource. */
    resourceId: string;
}
export declare const PurgeCacheRequest: {
    encode(message: PurgeCacheRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): PurgeCacheRequest;
    fromJSON(object: any): PurgeCacheRequest;
    toJSON(message: PurgeCacheRequest): unknown;
    fromPartial<I extends {
        resourceId?: string | undefined;
        paths?: string[] | undefined;
    } & {
        resourceId?: string | undefined;
        paths?: (string[] & string[] & Record<Exclude<keyof I["paths"], keyof string[]>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof PurgeCacheRequest>, never>>(object: I): PurgeCacheRequest;
};
export declare const PurgeCacheMetadata: {
    encode(message: PurgeCacheMetadata, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): PurgeCacheMetadata;
    fromJSON(object: any): PurgeCacheMetadata;
    toJSON(message: PurgeCacheMetadata): unknown;
    fromPartial<I extends {
        resourceId?: string | undefined;
    } & {
        resourceId?: string | undefined;
    } & Record<Exclude<keyof I, "resourceId">, never>>(object: I): PurgeCacheMetadata;
};
export declare const PrefetchCacheRequest: {
    encode(message: PrefetchCacheRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): PrefetchCacheRequest;
    fromJSON(object: any): PrefetchCacheRequest;
    toJSON(message: PrefetchCacheRequest): unknown;
    fromPartial<I extends {
        resourceId?: string | undefined;
        paths?: string[] | undefined;
    } & {
        resourceId?: string | undefined;
        paths?: (string[] & string[] & Record<Exclude<keyof I["paths"], keyof string[]>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof PrefetchCacheRequest>, never>>(object: I): PrefetchCacheRequest;
};
export declare const PrefetchCacheMetadata: {
    encode(message: PrefetchCacheMetadata, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): PrefetchCacheMetadata;
    fromJSON(object: any): PrefetchCacheMetadata;
    toJSON(message: PrefetchCacheMetadata): unknown;
    fromPartial<I extends {
        resourceId?: string | undefined;
    } & {
        resourceId?: string | undefined;
    } & Record<Exclude<keyof I, "resourceId">, never>>(object: I): PrefetchCacheMetadata;
};
/** A set of methods for managing Cache Service resources. */
export declare const CacheServiceService: {
    /**
     * Removes specified files from the cache of the specified resource. For details about purging, see [documentation](/docs/cdn/concepts/caching#purge).
     *
     * Purging may take up to 15 minutes.
     */
    readonly purge: {
        readonly path: "/yandex.cloud.cdn.v1.CacheService/Purge";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: PurgeCacheRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => PurgeCacheRequest;
        readonly responseSerialize: (value: Operation) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Operation;
    };
    /** Uploads specified files from origins to cache of the specified resource. For defails about prefetching, see [documentation](/docs/cdn/concepts/caching#prefetch). */
    readonly prefetch: {
        readonly path: "/yandex.cloud.cdn.v1.CacheService/Prefetch";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: PrefetchCacheRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => PrefetchCacheRequest;
        readonly responseSerialize: (value: Operation) => Buffer;
        readonly responseDeserialize: (value: Buffer) => Operation;
    };
};
export interface CacheServiceServer extends UntypedServiceImplementation {
    /**
     * Removes specified files from the cache of the specified resource. For details about purging, see [documentation](/docs/cdn/concepts/caching#purge).
     *
     * Purging may take up to 15 minutes.
     */
    purge: handleUnaryCall<PurgeCacheRequest, Operation>;
    /** Uploads specified files from origins to cache of the specified resource. For defails about prefetching, see [documentation](/docs/cdn/concepts/caching#prefetch). */
    prefetch: handleUnaryCall<PrefetchCacheRequest, Operation>;
}
export interface CacheServiceClient extends Client {
    /**
     * Removes specified files from the cache of the specified resource. For details about purging, see [documentation](/docs/cdn/concepts/caching#purge).
     *
     * Purging may take up to 15 minutes.
     */
    purge(request: PurgeCacheRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    purge(request: PurgeCacheRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    purge(request: PurgeCacheRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    /** Uploads specified files from origins to cache of the specified resource. For defails about prefetching, see [documentation](/docs/cdn/concepts/caching#prefetch). */
    prefetch(request: PrefetchCacheRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    prefetch(request: PrefetchCacheRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
    prefetch(request: PrefetchCacheRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
}
export declare const CacheServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): CacheServiceClient;
    service: typeof CacheServiceService;
};
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 {};
