def list_registered_models(self) -> List[RegisteredModelDetail]:
        """
        List of all registered models in Model Center backend.

        :return: List of :py:class:`ai_flow.model_center.entity.RegisteredModel` objects.
        """
        request = ListRegisteredModelsRequest()
        response = self.model_center_stub.listRegisteredModels(request)
        registered_model_details = []
        for registered_model_detail in _parse_response(response, RegisteredModelMetas()).registered_models:
            registered_model_details.append(RegisteredModelDetail.from_proto(registered_model_detail))
        return registered_model_details
    def create_registered_model(self, model_name, model_type, model_desc=None) -> Optional[RegisteredModelDetail]:
        """
        Create a new registered model from given type in Model Center.

        :param model_name: Name of registered model. This is expected to be unique in the backend store.
        :param model_type: Type of registered model.
        :param model_desc: (Optional) Description of registered model.

        :return: A single object of :py:class:`ai_flow.model_center.entity.RegisteredModelDetail` created in
        Model Center.
        """
        request = CreateRegisteredModelRequest(
            registered_model=RegisteredModelParam(model_name=stringValue(model_name),
                                                  model_type=ModelType.Value(model_type),
                                                  model_desc=stringValue(model_desc)))
        response = self.model_center_stub.createRegisteredModel(request)
        return RegisteredModelDetail.from_proto(_parse_response(response, RegisteredModelMeta()))
    def update_registered_model(self, model_name, new_name=None, model_type=None,
                                model_desc=None) -> Optional[RegisteredModelDetail]:
        """
        Update metadata for RegisteredModel entity backend. Either ``model_name`` or ``model_type`` or ``model_desc``
        should be non-None. Backend raises exception if a registered model with given name does not exist.

        :param model_name: Name of registered model. This is expected to be unique in the backend store.
        :param new_name: (Optional) New proposed name for the registered model.
        :param model_type: (Optional) Type of registered model.
        :param model_desc: (Optional) Description of registered model.

        :return: A single updated :py:class:`ai_flow.model_center.entity.RegisteredModelDetail` object.
        """
        request = UpdateRegisteredModelRequest(model_meta=ModelMetaParam(model_name=stringValue(model_name)),
                                               registered_model=RegisteredModelParam(model_name=stringValue(new_name),
                                                                                     model_type=ModelType.Value(
                                                                                         model_type),
                                                                                     model_desc=stringValue(
                                                                                         model_desc)))
        response = self.model_center_stub.updateRegisteredModel(request)
        return RegisteredModelDetail.from_proto(_parse_response(response, RegisteredModelMeta()))