@staticmethod
def convert_pb_to_doc(pb, doc):
    '\n        Convert protobuf to database document.\n\n        :param pb: A protobuf\n        :type pb: starbelly.starbelly_pb2.PolicyLimits\n        :returns: Database document.\n        :rtype: dict\n        '
    doc['max_cost'] = (pb.max_cost if pb.HasField('max_cost') else None)
    doc['max_duration'] = (pb.max_duration if pb.HasField('max_duration') else None)
    doc['max_items'] = (pb.max_items if pb.HasField('max_items') else None)
Convert protobuf to database document.

:param pb: A protobuf
:type pb: starbelly.starbelly_pb2.PolicyLimits
:returns: Database document.
:rtype: dict
@staticmethod
def convert_pb_to_doc(pb, doc):
    '\n        Convert protobuf to database document.\n\n        :param pb: A protobuf\n        :type pb: starbelly.starbelly_pb2.PolicyLimits\n        :returns: Database document.\n        :rtype: dict\n        '
    doc['max_cost'] = (pb.max_cost if pb.HasField('max_cost') else None)
    doc['max_duration'] = (pb.max_duration if pb.HasField('max_duration') else None)
    doc['max_items'] = (pb.max_items if pb.HasField('max_items') else None)