'Copies facet\'s contents to a document_pb.Facet proto buffer.'

def _CopyToProtocolBuffer(self, pb):

    pb.set_name(self.name)
    if (self.value is not None):
        facet_value_pb = pb.mutable_value()
        self._CopyValueToProtocolBuffer(facet_value_pb)
    return pb
