gravitino.api.model_change.ModelChange¶
- class gravitino.api.model_change.ModelChange¶
Bases:
ABC
A model change is a change to a model. It can be used to rename a model, update the comment of a model, set a property and value pair for a model, or remove a property from a model.
- __init__()¶
Methods
__init__
()remove_property
(pro)Creates a new model change to remove the property and value pairs for the model. Args: property: The name of the property to be removed. Returns: The model change.
rename
(new_name)Creates a new model change to rename the model. Args: new_name: The new name of the model. Returns: The model change.
set_property
(pro, value)Creates a new model change to set the property and value pairs for the model. Args: property: The name of the property to be set. value: The value of the property to be set. Returns: The model change.
update_comment
(comment)Creates a new model change to update the comment of the model. Args: comment: The new comment of the model. Returns: The model change.
- class RemoveProperty(pro)¶
Bases:
object
A model change to remove the property and value pairs for the model.
- property()¶
Retrieves the name of the property to be removed. Returns:
The name of the property.
- class RenameModel(new_name)¶
Bases:
object
A model change to rename the model.
- new_name()¶
Retrieves the new name set for the model. Returns:
The new name of the model.
- class SetProperty(pro, value)¶
Bases:
object
A model change to set the property and value pairs for the model.
- property()¶
Retrieves the name of the property to be set. Returns:
The name of the property.
- value()¶
Retrieves the value of the property to be set. Returns:
The value of the property.
- class UpdateComment(new_comment)¶
Bases:
object
A model change to update the comment of the model.
- new_comment()¶
Retrieves the comment of the model. Returns:
The comment of the model.
- static remove_property(pro)¶
Creates a new model change to remove the property and value pairs for the model. Args:
property: The name of the property to be removed.
- Returns:
The model change.
- static rename(new_name)¶
Creates a new model change to rename the model. Args:
new_name: The new name of the model.
- Returns:
The model change.
- static set_property(pro, value)¶
Creates a new model change to set the property and value pairs for the model. Args:
property: The name of the property to be set. value: The value of the property to be set.
- Returns:
The model change.
- static update_comment(comment)¶
Creates a new model change to update the comment of the model. Args:
comment: The new comment of the model.
- Returns:
The model change.