import { google } from '../../protos/protos'; export type IGcRule = google.bigtable.admin.v2.IGcRule; export type IDuration = google.protobuf.IDuration; type RequireExactlyOne = { [K in Keys]-?: Required> & Partial, never>>; }[Keys]; type BuildExclusiveType = RequireExactlyOne>; export type GcUnion = Pick; export type GcIntersection = Pick; export type GcGrouping = GcUnion | GcIntersection; export type GcRuleItem = BuildExclusiveType; /** * Helper class for building valid garbage collection rules. TypeScript is * recommended here for the maximum help, as types will guide user code at * compile time; however, some correctness checking happens at runtime to help * JavaScript users as well. */ export declare class GcRuleBuilder { /** * Formats exception strings. * * @private * @param p The IGcRule parameter that's failing * @param why A string describing why it's failing * @returns A formatted exception message */ static formatErrorParameter(p: IGcRule, why: string): string; /** * Runtime checks for JavaScript code. * @private */ static checkGroupingItem(p: GcGrouping | GcRuleItem): void; /** * Runtime checks for JavaScript code. * @private */ static checkRuleItem(p: GcRuleItem): void; /** * Unions are formed from other groupings (union, intersection) and potentially * rules (e.g. maxAge). They will match if any of the items are true. * * @param params Groupings and/or rules to be included * @returns [IGcRule] A newly built group */ static union(...params: Array): GcGrouping; /** * Intersections are formed from other groupings (union, intersection) and potentially * rules (e.g. maxAge). They will match if all of the items are true. * * @param params Groupings and/or rules to be included * @returns [IGcRule] A newly built group */ static intersection(...params: Array): GcGrouping; /** * Rules are leaf nodes and contain constraints such as maxAge and maxNumVersions. * * @param params [IGcRule] Filled rule * @returns [IGcRule] A typed/checked rule */ static rule(rule: GcRuleItem): GcRuleItem; } export {};