def to_pb(self):
        """Converts the :class:`GarbageCollectionRule` to a protobuf.

        :rtype: :class:`.data_pb2.GcRule`
        :returns: The converted current object.
        """
        self._check_single_value()
        gc_rule_kwargs = {}
        if self.max_num_versions is not None:
            gc_rule_kwargs['max_num_versions'] = self.max_num_versions
        if self.max_age is not None:
            gc_rule_kwargs['max_age'] = _timedelta_to_duration_pb(self.max_age)
        return data_pb2.GcRule(**gc_rule_kwargs)
 def _callFUT(self, timedelta_val):
     from gcloud_bigtable._helpers import _timedelta_to_duration_pb
     return _timedelta_to_duration_pb(timedelta_val)