'Converts this Key to its protocol buffer representation.
Not intended to be used by application developers. Enforced by hiding the
entity_pb classes.
Returns:
# the Reference PB representation of this Key
entity_pb.Reference'

def _ToPb(self):

    pb = entity_pb.Reference()
    pb.CopyFrom(self.__reference)
    pb.app().decode('utf-8')
    for pathelem in pb.path().element_list():
        pathelem.type().decode('utf-8')
    return pb
