/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
import { CronTab, BackupRetentionPolicy } from '../../../../../yandex/cloud/mdb/postgresql/v1/backup_retention_policy';
export declare const protobufPackage = "yandex.cloud.mdb.postgresql.v1";
export interface ListBackupRetentionPoliciesRequest {
    /**
     * ID of the PostgreSQL cluster.
     * To get the PostgreSQL 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 [ListBackupRetentionPoliciesResponse.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 [ListBackupRetentionPoliciesResponse.next_page_token] returned by the previous list request.
     */
    pageToken: string;
}
export interface ListBackupRetentionPoliciesResponse {
    /** List of [BackupRetentionPolicy] associated with the cluster. */
    policies: BackupRetentionPolicy[];
    /**
     * This token allows you to get the next page of results for list requests. If the number of results
     * is larger than [ListBackupRetentionPoliciesRequest.page_size], use the [next_page_token] as the value
     * for the [ListBackupRetentionPoliciesRequest.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 CreateBackupRetentionPolicyRequest {
    /**
     * ID of the PostgreSQL cluster.
     * To get the PostgreSQL cluster ID use a [ClusterService.List] request.
     */
    clusterId: string;
    /** CronTab schedule. */
    cron?: CronTab;
    /** Retention duration. */
    retainForDays: number;
    /** Policy description. */
    description: string;
    /** Required. Policy name. */
    policyName: string;
}
export interface CreateBackupRetentionPolicyResponse {
    /** Newly created [BackupRetentionPolicy]. */
    policy?: BackupRetentionPolicy;
}
export interface DeleteBackupRetentionPolicyRequest {
    /** Unique identifier for the [BackupRetentionPolicy]. */
    policyId: string;
    /**
     * ID of the PostgreSQL cluster.
     * To get the PostgreSQL cluster ID use a [ClusterService.List] request.
     */
    clusterId: string;
}
export interface DeleteBackupRetentionPolicyResponse {
}
export declare const ListBackupRetentionPoliciesRequest: {
    encode(message: ListBackupRetentionPoliciesRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListBackupRetentionPoliciesRequest;
    fromJSON(object: any): ListBackupRetentionPoliciesRequest;
    toJSON(message: ListBackupRetentionPoliciesRequest): unknown;
    fromPartial<I extends {
        clusterId?: string | undefined;
        pageSize?: number | undefined;
        pageToken?: string | undefined;
    } & {
        clusterId?: string | undefined;
        pageSize?: number | undefined;
        pageToken?: string | undefined;
    } & Record<Exclude<keyof I, keyof ListBackupRetentionPoliciesRequest>, never>>(object: I): ListBackupRetentionPoliciesRequest;
};
export declare const ListBackupRetentionPoliciesResponse: {
    encode(message: ListBackupRetentionPoliciesResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListBackupRetentionPoliciesResponse;
    fromJSON(object: any): ListBackupRetentionPoliciesResponse;
    toJSON(message: ListBackupRetentionPoliciesResponse): unknown;
    fromPartial<I extends {
        policies?: {
            policyId?: string | undefined;
            clusterId?: string | undefined;
            policyName?: string | undefined;
            createdAt?: Date | undefined;
            cron?: {
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } | undefined;
            retainForDays?: number | undefined;
            description?: string | undefined;
        }[] | undefined;
        nextPageToken?: string | undefined;
    } & {
        policies?: ({
            policyId?: string | undefined;
            clusterId?: string | undefined;
            policyName?: string | undefined;
            createdAt?: Date | undefined;
            cron?: {
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } | undefined;
            retainForDays?: number | undefined;
            description?: string | undefined;
        }[] & ({
            policyId?: string | undefined;
            clusterId?: string | undefined;
            policyName?: string | undefined;
            createdAt?: Date | undefined;
            cron?: {
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } | undefined;
            retainForDays?: number | undefined;
            description?: string | undefined;
        } & {
            policyId?: string | undefined;
            clusterId?: string | undefined;
            policyName?: string | undefined;
            createdAt?: Date | undefined;
            cron?: ({
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } & {
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } & Record<Exclude<keyof I["policies"][number]["cron"], keyof CronTab>, never>) | undefined;
            retainForDays?: number | undefined;
            description?: string | undefined;
        } & Record<Exclude<keyof I["policies"][number], keyof BackupRetentionPolicy>, never>)[] & Record<Exclude<keyof I["policies"], keyof {
            policyId?: string | undefined;
            clusterId?: string | undefined;
            policyName?: string | undefined;
            createdAt?: Date | undefined;
            cron?: {
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } | undefined;
            retainForDays?: number | undefined;
            description?: string | undefined;
        }[]>, never>) | undefined;
        nextPageToken?: string | undefined;
    } & Record<Exclude<keyof I, keyof ListBackupRetentionPoliciesResponse>, never>>(object: I): ListBackupRetentionPoliciesResponse;
};
export declare const CreateBackupRetentionPolicyRequest: {
    encode(message: CreateBackupRetentionPolicyRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): CreateBackupRetentionPolicyRequest;
    fromJSON(object: any): CreateBackupRetentionPolicyRequest;
    toJSON(message: CreateBackupRetentionPolicyRequest): unknown;
    fromPartial<I extends {
        clusterId?: string | undefined;
        cron?: {
            dayOfMonth?: string | undefined;
            month?: string | undefined;
            dayOfWeek?: string | undefined;
        } | undefined;
        retainForDays?: number | undefined;
        description?: string | undefined;
        policyName?: string | undefined;
    } & {
        clusterId?: string | undefined;
        cron?: ({
            dayOfMonth?: string | undefined;
            month?: string | undefined;
            dayOfWeek?: string | undefined;
        } & {
            dayOfMonth?: string | undefined;
            month?: string | undefined;
            dayOfWeek?: string | undefined;
        } & Record<Exclude<keyof I["cron"], keyof CronTab>, never>) | undefined;
        retainForDays?: number | undefined;
        description?: string | undefined;
        policyName?: string | undefined;
    } & Record<Exclude<keyof I, keyof CreateBackupRetentionPolicyRequest>, never>>(object: I): CreateBackupRetentionPolicyRequest;
};
export declare const CreateBackupRetentionPolicyResponse: {
    encode(message: CreateBackupRetentionPolicyResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): CreateBackupRetentionPolicyResponse;
    fromJSON(object: any): CreateBackupRetentionPolicyResponse;
    toJSON(message: CreateBackupRetentionPolicyResponse): unknown;
    fromPartial<I extends {
        policy?: {
            policyId?: string | undefined;
            clusterId?: string | undefined;
            policyName?: string | undefined;
            createdAt?: Date | undefined;
            cron?: {
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } | undefined;
            retainForDays?: number | undefined;
            description?: string | undefined;
        } | undefined;
    } & {
        policy?: ({
            policyId?: string | undefined;
            clusterId?: string | undefined;
            policyName?: string | undefined;
            createdAt?: Date | undefined;
            cron?: {
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } | undefined;
            retainForDays?: number | undefined;
            description?: string | undefined;
        } & {
            policyId?: string | undefined;
            clusterId?: string | undefined;
            policyName?: string | undefined;
            createdAt?: Date | undefined;
            cron?: ({
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } & {
                dayOfMonth?: string | undefined;
                month?: string | undefined;
                dayOfWeek?: string | undefined;
            } & Record<Exclude<keyof I["policy"]["cron"], keyof CronTab>, never>) | undefined;
            retainForDays?: number | undefined;
            description?: string | undefined;
        } & Record<Exclude<keyof I["policy"], keyof BackupRetentionPolicy>, never>) | undefined;
    } & Record<Exclude<keyof I, "policy">, never>>(object: I): CreateBackupRetentionPolicyResponse;
};
export declare const DeleteBackupRetentionPolicyRequest: {
    encode(message: DeleteBackupRetentionPolicyRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): DeleteBackupRetentionPolicyRequest;
    fromJSON(object: any): DeleteBackupRetentionPolicyRequest;
    toJSON(message: DeleteBackupRetentionPolicyRequest): unknown;
    fromPartial<I extends {
        policyId?: string | undefined;
        clusterId?: string | undefined;
    } & {
        policyId?: string | undefined;
        clusterId?: string | undefined;
    } & Record<Exclude<keyof I, keyof DeleteBackupRetentionPolicyRequest>, never>>(object: I): DeleteBackupRetentionPolicyRequest;
};
export declare const DeleteBackupRetentionPolicyResponse: {
    encode(_: DeleteBackupRetentionPolicyResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): DeleteBackupRetentionPolicyResponse;
    fromJSON(_: any): DeleteBackupRetentionPolicyResponse;
    toJSON(_: DeleteBackupRetentionPolicyResponse): unknown;
    fromPartial<I extends {} & {} & Record<Exclude<keyof I, never>, never>>(_: I): DeleteBackupRetentionPolicyResponse;
};
/** A set of methods for managing PostgreSQL Cluster backup retention policies. */
export declare const BackupRetentionPolicyServiceService: {
    /** List all retention policies. */
    readonly list: {
        readonly path: "/yandex.cloud.mdb.postgresql.v1.BackupRetentionPolicyService/List";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: ListBackupRetentionPoliciesRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => ListBackupRetentionPoliciesRequest;
        readonly responseSerialize: (value: ListBackupRetentionPoliciesResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => ListBackupRetentionPoliciesResponse;
    };
    /** Add a new retention policy. */
    readonly create: {
        readonly path: "/yandex.cloud.mdb.postgresql.v1.BackupRetentionPolicyService/Create";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: CreateBackupRetentionPolicyRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => CreateBackupRetentionPolicyRequest;
        readonly responseSerialize: (value: CreateBackupRetentionPolicyResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => CreateBackupRetentionPolicyResponse;
    };
    /** Delete retention policy. */
    readonly delete: {
        readonly path: "/yandex.cloud.mdb.postgresql.v1.BackupRetentionPolicyService/Delete";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: DeleteBackupRetentionPolicyRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => DeleteBackupRetentionPolicyRequest;
        readonly responseSerialize: (value: DeleteBackupRetentionPolicyResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => DeleteBackupRetentionPolicyResponse;
    };
};
export interface BackupRetentionPolicyServiceServer extends UntypedServiceImplementation {
    /** List all retention policies. */
    list: handleUnaryCall<ListBackupRetentionPoliciesRequest, ListBackupRetentionPoliciesResponse>;
    /** Add a new retention policy. */
    create: handleUnaryCall<CreateBackupRetentionPolicyRequest, CreateBackupRetentionPolicyResponse>;
    /** Delete retention policy. */
    delete: handleUnaryCall<DeleteBackupRetentionPolicyRequest, DeleteBackupRetentionPolicyResponse>;
}
export interface BackupRetentionPolicyServiceClient extends Client {
    /** List all retention policies. */
    list(request: ListBackupRetentionPoliciesRequest, callback: (error: ServiceError | null, response: ListBackupRetentionPoliciesResponse) => void): ClientUnaryCall;
    list(request: ListBackupRetentionPoliciesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListBackupRetentionPoliciesResponse) => void): ClientUnaryCall;
    list(request: ListBackupRetentionPoliciesRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListBackupRetentionPoliciesResponse) => void): ClientUnaryCall;
    /** Add a new retention policy. */
    create(request: CreateBackupRetentionPolicyRequest, callback: (error: ServiceError | null, response: CreateBackupRetentionPolicyResponse) => void): ClientUnaryCall;
    create(request: CreateBackupRetentionPolicyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CreateBackupRetentionPolicyResponse) => void): ClientUnaryCall;
    create(request: CreateBackupRetentionPolicyRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CreateBackupRetentionPolicyResponse) => void): ClientUnaryCall;
    /** Delete retention policy. */
    delete(request: DeleteBackupRetentionPolicyRequest, callback: (error: ServiceError | null, response: DeleteBackupRetentionPolicyResponse) => void): ClientUnaryCall;
    delete(request: DeleteBackupRetentionPolicyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: DeleteBackupRetentionPolicyResponse) => void): ClientUnaryCall;
    delete(request: DeleteBackupRetentionPolicyRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: DeleteBackupRetentionPolicyResponse) => void): ClientUnaryCall;
}
export declare const BackupRetentionPolicyServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): BackupRetentionPolicyServiceClient;
    service: typeof BackupRetentionPolicyServiceService;
};
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 {};
