code: def type(self):
          
          if self.__type is None:
              found_type = find_definition(
                  self.__type_name, self.message_definition())
              if not (found_type is not Enum and
                      isinstance(found_type, type) and
                      issubclass(found_type, Enum)):
                  raise FieldDefinitionError(
                      'Invalid enum type: %s' % found_type)
  
              self.__type = found_type
          return self.__type
docs: Enum type used for field.