public final class GcRuleBuilder extends Object
Use this class to construct GcRule instances instead of the raw proto builder (GcRule.newBuilder()) to avoid common pitfalls with "oneof" fields (e.g. accidentally overwriting
max age with max versions).
| Modifier and Type | Method and Description |
|---|---|
static IntersectionRuleBuilder |
intersection()
Starts building an Intersection (AND) rule.
|
static GcRule |
maxAge(Duration age)
Creates a Max Age rule.
|
static GcRule |
maxVersions(int versions)
Creates a Max Versions rule.
|
static UnionRuleBuilder |
union()
Starts building a Union (OR) rule.
|
public static IntersectionRuleBuilder intersection()
public static UnionRuleBuilder union()
public static GcRule maxAge(Duration age)
age - The maximum age of the cell.public static GcRule maxVersions(int versions)
versions - The maximum number of versions.Copyright © 2026 Google LLC. All rights reserved.