def to_pb(self): """Converts the garbage collection rule to a protobuf. :rtype: :class:`.table_v2_pb2.GcRule` :returns: The converted current object. """ return table_v2_pb2.GcRule(max_num_versions=self.max_num_versions)
def to_pb(self): """Converts the garbage collection rule to a protobuf. :rtype: :class:`.table_v2_pb2.GcRule` :returns: The converted current object. """ max_age = _timedelta_to_duration_pb(self.max_age) return table_v2_pb2.GcRule(max_age=max_age)
def to_pb(self): """Converts the intersection into a single GC rule as a protobuf. :rtype: :class:`.table_v2_pb2.GcRule` :returns: The converted current object. """ intersection = table_v2_pb2.GcRule.Intersection( rules=[rule.to_pb() for rule in self.rules]) return table_v2_pb2.GcRule(intersection=intersection)
def _GcRulePB(*args, **kw): from google.cloud.bigtable._generated import (table_pb2 as table_v2_pb2) return table_v2_pb2.GcRule(*args, **kw)