@staticmethod
def convert_doc_to_pb(doc, pb):
    '\n        Convert from database document to protobuf.\n\n        :param dict doc: Database document.\n        :param pb: An empty protobuf.\n        :type pb: starbelly.starbelly_pb2.PolicyUrlRules\n        '
    for doc_url in doc:
        pb_url = pb.add()
        if ('pattern' in doc_url):
            pb_url.pattern = doc_url['pattern']
        if ('match' in doc_url):
            pb_url.match = MATCH_ENUM.Value(doc_url['match'])
        if ('action' in doc_url):
            pb_url.action = ACTION_ENUM.Value(doc_url['action'])
        if ('amount' in doc_url):
            pb_url.amount = doc_url['amount']
Convert from database document to protobuf.

:param dict doc: Database document.
:param pb: An empty protobuf.
:type pb: starbelly.starbelly_pb2.PolicyUrlRules
@staticmethod
def convert_doc_to_pb(doc, pb):
    '\n        Convert from database document to protobuf.\n\n        :param dict doc: Database document.\n        :param pb: An empty protobuf.\n        :type pb: starbelly.starbelly_pb2.PolicyUrlRules\n        '
    for doc_url in doc:
        pb_url = pb.add()
        if ('pattern' in doc_url):
            pb_url.pattern = doc_url['pattern']
        if ('match' in doc_url):
            pb_url.match = MATCH_ENUM.Value(doc_url['match'])
        if ('action' in doc_url):
            pb_url.action = ACTION_ENUM.Value(doc_url['action'])
        if ('amount' in doc_url):
            pb_url.amount = doc_url['amount']