@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.PolicyMimeTypeRules\n        :returns: Database document.\n        :rtype: dict\n        '
    for pb_mime in pb:
        doc_mime = dict()
        if pb_mime.HasField('pattern'):
            doc_mime['pattern'] = pb_mime.pattern
        if pb_mime.HasField('match'):
            doc_mime['match'] = MATCH_ENUM.Name(pb_mime.match)
        if pb_mime.HasField('save'):
            doc_mime['save'] = pb_mime.save
        doc.append(doc_mime)
Convert protobuf to database document.

:param pb: A protobuf
:type pb: starbelly.starbelly_pb2.PolicyMimeTypeRules
: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.PolicyMimeTypeRules\n        :returns: Database document.\n        :rtype: dict\n        '
    for pb_mime in pb:
        doc_mime = dict()
        if pb_mime.HasField('pattern'):
            doc_mime['pattern'] = pb_mime.pattern
        if pb_mime.HasField('match'):
            doc_mime['match'] = MATCH_ENUM.Name(pb_mime.match)
        if pb_mime.HasField('save'):
            doc_mime['save'] = pb_mime.save
        doc.append(doc_mime)