jerryshao commented on code in PR #7133:
URL: https://github.com/apache/gravitino/pull/7133#discussion_r2083729012
##########
clients/client-python/gravitino/dto/requests/model_version_update_request.py:
##########
@@ -138,3 +138,51 @@ def model_version_change(self):
ModelVersionChange: The ModelVersionChange object representing
the update uri operation.
"""
return ModelVersionChange.update_uri(self._new_uri)
+
+ @dataclass
+ class ModelVersionAliasesRequest(ModelVersionUpdateRequestBase):
+ """Request to update model version aliases"""
+
+ _aliases_to_add: Optional[Set[str]] = field(
+ metadata=config(field_name="aliasesToAdd")
+ )
+ _aliases_to_remove: Optional[Set[str]] = field(
+ metadata=config(field_name="aliasesToRemove")
+ )
+
+ def __init__(self, aliases_to_add: Set[str], aliases_to_remove:
Set[str]):
+ super().__init__("updateAliases")
+ self._aliases_to_add = aliases_to_add
+ self._aliases_to_remove = aliases_to_remove
+
+ def aliases_to_add(self):
+ """Retrieves the new aliases of the model version.
+ Returns:
+ The new aliases of the model version.
+ """
+ return self._aliases_to_add
+
+ def aliases_to_remove(self):
+ """Retrieves the new aliases of the model version.
+ Returns:
+ The new aliases of the model version.
+ """
+ return self._aliases_to_remove
+
+ def validate(self):
+ """Validates the fields of the request. Always pass."""
Review Comment:
Can you please update the comment here, it is not always pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]