/** Adds the provided ancestors to the key. */ public B addAncestors(Iterable<PathElement> ancestors) { ImmutableList<PathElement> list = ImmutableList.copyOf(ancestors); Preconditions.checkState( this.ancestors.size() + list.size() < MAX_PATH, "path can have at most 100 elements"); this.ancestors.addAll(list); return self(); }
/** Adds an ancestor for this key. */ public B addAncestor(PathElement ancestor) { Preconditions.checkState(ancestors.size() < MAX_PATH, "path can have at most 100 elements"); ancestors.add(ancestor); return self(); }
/** Adds the provided ancestors to the key. */ public B addAncestors(Iterable<PathElement> ancestors) { ImmutableList<PathElement> list = ImmutableList.copyOf(ancestors); Preconditions.checkState( this.ancestors.size() + list.size() < MAX_PATH, "path can have at most 100 elements"); this.ancestors.addAll(list); return self(); }
/** Sets the project ID of the key. */ public B setProjectId(String projectId) { this.projectId = validateDatabase(projectId); return self(); }
/** Sets the kind of the key. */ public B setKind(String kind) { this.kind = validateKind(kind); return self(); }
/** Adds an ancestor for this key. */ public B addAncestor(PathElement ancestor) { Preconditions.checkState(ancestors.size() < MAX_PATH, "path can have at most 100 elements"); ancestors.add(ancestor); return self(); }
/** Sets the namespace of the key. */ public B setNamespace(String namespace) { this.namespace = validateNamespace(namespace); return self(); }
/** Sets the kind of the key. */ public B setKind(String kind) { this.kind = validateKind(kind); return self(); }
/** Sets the namespace of the key. */ public B setNamespace(String namespace) { this.namespace = validateNamespace(namespace); return self(); }
/** Sets the project ID of the key. */ public B setProjectId(String projectId) { this.projectId = validateDatabase(projectId); return self(); }