def Get(taxonomy_id, annotation_id): """Makes an API call to get the definition of an annotation. Args: taxonomy_id: Id of a taxonomy. annotation_id: Id of the annotation. Returns: An Annotation message. """ return _GetService().Get(utils.GetMessagesModule( ).DatapolTaxonomyStoresDataTaxonomiesAnnotationsGetRequest( name=utils.GetAnnotationRelativeName(taxonomy_id, annotation_id)))
def Get(taxonomy_name, annotation_name): """Makes an API call to get the definition of an annotation. Args: taxonomy_name: Name of a taxonomy. annotation_name: Name of the annotation. Returns: An Annotation message. """ return _GetService().Get( utils.GetMessagesModule() .DatapolOrgsPolicyTaxonomiesAnnotationsGetRequest( name=utils.GetAnnotationRelativeName(taxonomy_name, annotation_name)))
def Delete(taxonomy_id, annotation_id): """Makes an API call to delete an annotation. Args: taxonomy_id: Id of a taxonomy. annotation_id: Id of the annotation. Returns: An Operation message which can be used to check on the progress of the project creation. """ return _GetService().Delete(utils.GetMessagesModule( ).DatapolTaxonomyStoresDataTaxonomiesAnnotationsDeleteRequest( name=utils.GetAnnotationRelativeName(taxonomy_id, annotation_id)))
def Update(taxonomy_id, annotation_id, description): """Makes an API call to update an annotation. Args: taxonomy_id: Id of a taxonomy. annotation_id: Id of the annotation. description: New description to be updated. Returns: An Annotation message. """ messages = utils.GetMessagesModule() return _GetService().Patch( messages.DatapolTaxonomyStoresDataTaxonomiesAnnotationsPatchRequest( name=utils.GetAnnotationRelativeName(taxonomy_id, annotation_id), annotation=messages.Annotation(description=description)))
def Update(taxonomy_name, annotation_name, description): """Makes an API call to update an annotation. Args: taxonomy_name: Name of a taxonomy. annotation_name: Name of the annotation. description: New description to be updated. Returns: An Annotation message. """ messages = utils.GetMessagesModule() return _GetService().Patch( messages.DatapolOrgsPolicyTaxonomiesAnnotationsPatchRequest( name=utils.GetAnnotationRelativeName(taxonomy_name, annotation_name), updateAnnotationRequest=messages.UpdateAnnotationRequest( description=description)))