diff --git a/sdk/purview/azure-purview-datamap/_meta.json b/sdk/purview/azure-purview-datamap/_meta.json new file mode 100644 index 000000000000..6c0e20166191 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/_meta.json @@ -0,0 +1,6 @@ +{ + "commit": "aa82ae66eb50ea6624847006cacdea92f3c026c6", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "typespec_src": "specification/purview/Azure.Analytics.Purview.DataMap", + "@azure-tools/typespec-python": "0.39.1" +} \ No newline at end of file diff --git a/sdk/purview/azure-purview-datamap/apiview-properties.json b/sdk/purview/azure-purview-datamap/apiview-properties.json new file mode 100644 index 000000000000..492a1a1eb7ad --- /dev/null +++ b/sdk/purview/azure-purview-datamap/apiview-properties.json @@ -0,0 +1,185 @@ +{ + "CrossLanguagePackageId": "PurviewDataMap", + "CrossLanguageDefinitionId": { + "azure.purview.datamap.models.AtlasAttributeDef": "PurviewDataMap.AtlasAttributeDef", + "azure.purview.datamap.models.AtlasBusinessMetadataDef": "PurviewDataMap.AtlasBusinessMetadataDef", + "azure.purview.datamap.models.AtlasClassification": "PurviewDataMap.AtlasClassification", + "azure.purview.datamap.models.AtlasClassificationDef": "PurviewDataMap.AtlasClassificationDef", + "azure.purview.datamap.models.AtlasClassifications": "PurviewDataMap.AtlasClassifications", + "azure.purview.datamap.models.AtlasConstraintDef": "PurviewDataMap.AtlasConstraintDef", + "azure.purview.datamap.models.AtlasEntitiesWithExtInfo": "PurviewDataMap.AtlasEntitiesWithExtInfo", + "azure.purview.datamap.models.AtlasEntity": "PurviewDataMap.AtlasEntity", + "azure.purview.datamap.models.AtlasEntityDef": "PurviewDataMap.AtlasEntityDef", + "azure.purview.datamap.models.AtlasEntityHeader": "PurviewDataMap.AtlasEntityHeader", + "azure.purview.datamap.models.AtlasEntityHeaders": "PurviewDataMap.AtlasEntityHeaders", + "azure.purview.datamap.models.AtlasEntityWithExtInfo": "PurviewDataMap.AtlasEntityWithExtInfo", + "azure.purview.datamap.models.AtlasEnumDef": "PurviewDataMap.AtlasEnumDef", + "azure.purview.datamap.models.AtlasEnumElementDef": "PurviewDataMap.AtlasEnumElementDef", + "azure.purview.datamap.models.AtlasErrorResponse": "PurviewDataMap.AtlasErrorResponse", + "azure.purview.datamap.models.AtlasGlossary": "PurviewDataMap.AtlasGlossary", + "azure.purview.datamap.models.AtlasGlossaryCategory": "PurviewDataMap.AtlasGlossaryCategory", + "azure.purview.datamap.models.AtlasGlossaryExtInfo": "PurviewDataMap.AtlasGlossaryExtInfo", + "azure.purview.datamap.models.AtlasGlossaryHeader": "PurviewDataMap.AtlasGlossaryHeader", + "azure.purview.datamap.models.AtlasGlossaryTerm": "PurviewDataMap.AtlasGlossaryTerm", + "azure.purview.datamap.models.AtlasLineageInfo": "PurviewDataMap.AtlasLineageInfo", + "azure.purview.datamap.models.AtlasObjectId": "PurviewDataMap.AtlasObjectId", + "azure.purview.datamap.models.AtlasRelatedCategoryHeader": "PurviewDataMap.AtlasRelatedCategoryHeader", + "azure.purview.datamap.models.AtlasRelatedObjectId": "PurviewDataMap.AtlasRelatedObjectId", + "azure.purview.datamap.models.AtlasRelatedTermHeader": "PurviewDataMap.AtlasRelatedTermHeader", + "azure.purview.datamap.models.AtlasRelationship": "PurviewDataMap.AtlasRelationship", + "azure.purview.datamap.models.AtlasRelationshipAttributeDef": "PurviewDataMap.AtlasRelationshipAttributeDef", + "azure.purview.datamap.models.AtlasRelationshipDef": "PurviewDataMap.AtlasRelationshipDef", + "azure.purview.datamap.models.AtlasRelationshipEndDef": "PurviewDataMap.AtlasRelationshipEndDef", + "azure.purview.datamap.models.AtlasRelationshipWithExtInfo": "PurviewDataMap.AtlasRelationshipWithExtInfo", + "azure.purview.datamap.models.AtlasStruct": "PurviewDataMap.AtlasStruct", + "azure.purview.datamap.models.AtlasStructDef": "PurviewDataMap.AtlasStructDef", + "azure.purview.datamap.models.AtlasTermAssignmentHeader": "PurviewDataMap.AtlasTermAssignmentHeader", + "azure.purview.datamap.models.AtlasTermCategorizationHeader": "PurviewDataMap.AtlasTermCategorizationHeader", + "azure.purview.datamap.models.AtlasTypeDef": "PurviewDataMap.AtlasTypeDef", + "azure.purview.datamap.models.AtlasTypeDefHeader": "PurviewDataMap.AtlasTypeDefHeader", + "azure.purview.datamap.models.AtlasTypesDef": "PurviewDataMap.AtlasTypesDef", + "azure.purview.datamap.models.AutoCompleteOptions": "PurviewDataMap.AutoCompleteOptions", + "azure.purview.datamap.models.AutoCompleteResult": "PurviewDataMap.AutoCompleteResult", + "azure.purview.datamap.models.AutoCompleteResultValue": "PurviewDataMap.AutoCompleteResultValue", + "azure.purview.datamap.models.BulkImportResult": "PurviewDataMap.BulkImportResult", + "azure.purview.datamap.models.BusinessMetadataOptions": "PurviewDataMap.BusinessMetadataOptions", + "azure.purview.datamap.models.ClassificationAssociateOptions": "PurviewDataMap.ClassificationAssociateOptions", + "azure.purview.datamap.models.ContactInfo": "PurviewDataMap.ContactInfo", + "azure.purview.datamap.models.ContactSearchResultValue": "PurviewDataMap.ContactSearchResultValue", + "azure.purview.datamap.models.DateFormat": "PurviewDataMap.DateFormat", + "azure.purview.datamap.models.EntityMutationResult": "PurviewDataMap.EntityMutationResult", + "azure.purview.datamap.models.ImportInfo": "PurviewDataMap.ImportInfo", + "azure.purview.datamap.models.LineageRelation": "PurviewDataMap.LineageRelation", + "azure.purview.datamap.models.MoveEntitiesOptions": "PurviewDataMap.MoveEntitiesOptions", + "azure.purview.datamap.models.NumberFormat": "PurviewDataMap.NumberFormat", + "azure.purview.datamap.models.ParentRelation": "PurviewDataMap.ParentRelation", + "azure.purview.datamap.models.PurviewObjectId": "PurviewDataMap.PurviewObjectId", + "azure.purview.datamap.models.QueryOptions": "PurviewDataMap.QueryOptions", + "azure.purview.datamap.models.QueryResult": "PurviewDataMap.QueryResult", + "azure.purview.datamap.models.ResourceLink": "PurviewDataMap.ResourceLink", + "azure.purview.datamap.models.SearchFacetItem": "PurviewDataMap.SearchFacetItem", + "azure.purview.datamap.models.SearchFacetItemValue": "PurviewDataMap.SearchFacetItemValue", + "azure.purview.datamap.models.SearchFacetResultValue": "PurviewDataMap.SearchFacetResultValue", + "azure.purview.datamap.models.SearchFacetSort": "PurviewDataMap.SearchFacetSort", + "azure.purview.datamap.models.SearchHighlights": "PurviewDataMap.SearchHighlights", + "azure.purview.datamap.models.SearchResultValue": "PurviewDataMap.SearchResultValue", + "azure.purview.datamap.models.SearchTaxonomySetting": "PurviewDataMap.SearchTaxonomySetting", + "azure.purview.datamap.models.SuggestOptions": "PurviewDataMap.SuggestOptions", + "azure.purview.datamap.models.SuggestResult": "PurviewDataMap.SuggestResult", + "azure.purview.datamap.models.SuggestResultValue": "PurviewDataMap.SuggestResultValue", + "azure.purview.datamap.models.TermSearchResultValue": "PurviewDataMap.TermSearchResultValue", + "azure.purview.datamap.models.TermTemplateDef": "PurviewDataMap.TermTemplateDef", + "azure.purview.datamap.models.TimeBoundary": "PurviewDataMap.TimeBoundary", + "azure.purview.datamap.models.TimeZone": "PurviewDataMap.TimeZone", + "azure.purview.datamap.models.EntityStatus": "PurviewDataMap.EntityStatus", + "azure.purview.datamap.models.AtlasTermAssignmentStatus": "PurviewDataMap.AtlasTermAssignmentStatus", + "azure.purview.datamap.models.BusinessAttributeUpdateBehavior": "PurviewDataMap.BusinessAttributeUpdateBehavior", + "azure.purview.datamap.models.SortType": "PurviewDataMap.SortType", + "azure.purview.datamap.models.ImportStatus": "PurviewDataMap.ImportStatus", + "azure.purview.datamap.models.AtlasTermRelationshipStatus": "PurviewDataMap.AtlasTermRelationshipStatus", + "azure.purview.datamap.models.TermStatus": "PurviewDataMap.TermStatus", + "azure.purview.datamap.models.StatusAtlasRelationship": "PurviewDataMap.StatusAtlasRelationship", + "azure.purview.datamap.models.SearchSortOrder": "PurviewDataMap.SearchSortOrder", + "azure.purview.datamap.models.LineageDirection": "PurviewDataMap.LineageDirection", + "azure.purview.datamap.models.TypeCategory": "PurviewDataMap.TypeCategory", + "azure.purview.datamap.models.RoundingMode": "PurviewDataMap.RoundingMode", + "azure.purview.datamap.models.CardinalityValue": "PurviewDataMap.CardinalityValue", + "azure.purview.datamap.models.RelationshipCategory": "PurviewDataMap.RelationshipCategory", + "azure.purview.datamap.DataMapClient.entity.create_or_update": "Customizations.Entity.createOrUpdate", + "azure.purview.datamap.DataMapClient.entity.get_by_ids": "Customizations.Entity.getByIds", + "azure.purview.datamap.DataMapClient.entity.batch_create_or_update": "Customizations.Entity.batchCreateOrUpdate", + "azure.purview.datamap.DataMapClient.entity.batch_delete": "Customizations.Entity.batchDelete", + "azure.purview.datamap.DataMapClient.entity.add_classification": "Customizations.Entity.addClassification", + "azure.purview.datamap.DataMapClient.entity.get": "Customizations.Entity.get", + "azure.purview.datamap.DataMapClient.entity.update_attribute_by_id": "Customizations.Entity.updateAttributeById", + "azure.purview.datamap.DataMapClient.entity.delete": "Customizations.Entity.delete", + "azure.purview.datamap.DataMapClient.entity.get_classification": "Customizations.Entity.getClassification", + "azure.purview.datamap.DataMapClient.entity.remove_classification": "Customizations.Entity.removeClassification", + "azure.purview.datamap.DataMapClient.entity.get_classifications": "Customizations.Entity.getClassifications", + "azure.purview.datamap.DataMapClient.entity.add_classifications": "Customizations.Entity.addClassifications", + "azure.purview.datamap.DataMapClient.entity.update_classifications": "Customizations.Entity.updateClassifications", + "azure.purview.datamap.DataMapClient.entity.get_by_unique_attribute": "Customizations.Entity.getByUniqueAttribute", + "azure.purview.datamap.DataMapClient.entity.update_by_unique_attribute": "Customizations.Entity.updateByUniqueAttribute", + "azure.purview.datamap.DataMapClient.entity.delete_by_unique_attribute": "Customizations.Entity.deleteByUniqueAttribute", + "azure.purview.datamap.DataMapClient.entity.remove_classification_by_unique_attribute": "Customizations.Entity.removeClassificationByUniqueAttribute", + "azure.purview.datamap.DataMapClient.entity.add_classifications_by_unique_attribute": "Customizations.Entity.addClassificationsByUniqueAttribute", + "azure.purview.datamap.DataMapClient.entity.update_classifications_unique_by_attribute": "Customizations.Entity.updateClassificationsUniqueByAttribute", + "azure.purview.datamap.DataMapClient.entity.batch_set_classifications": "Customizations.Entity.batchSetClassifications", + "azure.purview.datamap.DataMapClient.entity.batch_get_by_unique_attributes": "Customizations.Entity.batchGetByUniqueAttributes", + "azure.purview.datamap.DataMapClient.entity.get_header": "Customizations.Entity.getHeader", + "azure.purview.datamap.DataMapClient.entity.remove_business_metadata": "Customizations.Entity.removeBusinessMetadata", + "azure.purview.datamap.DataMapClient.entity.add_or_update_business_metadata": "Customizations.Entity.addOrUpdateBusinessMetadata", + "azure.purview.datamap.DataMapClient.entity.remove_business_metadata_attributes": "Customizations.Entity.removeBusinessMetadataAttributes", + "azure.purview.datamap.DataMapClient.entity.add_or_update_business_metadata_attributes": "Customizations.Entity.addOrUpdateBusinessMetadataAttributes", + "azure.purview.datamap.DataMapClient.entity.get_business_metadata_template": "Customizations.Entity.getBusinessMetadataTemplate", + "azure.purview.datamap.DataMapClient.entity.import_business_metadata": "Customizations.Entity.importBusinessMetadata", + "azure.purview.datamap.DataMapClient.entity.remove_labels": "Customizations.Entity.removeLabels", + "azure.purview.datamap.DataMapClient.entity.set_labels": "Customizations.Entity.setLabels", + "azure.purview.datamap.DataMapClient.entity.add_label": "Customizations.Entity.addLabel", + "azure.purview.datamap.DataMapClient.entity.remove_labels_by_unique_attribute": "Customizations.Entity.removeLabelsByUniqueAttribute", + "azure.purview.datamap.DataMapClient.entity.set_labels_by_unique_attribute": "Customizations.Entity.setLabelsByUniqueAttribute", + "azure.purview.datamap.DataMapClient.entity.add_labels_by_unique_attribute": "Customizations.Entity.addLabelsByUniqueAttribute", + "azure.purview.datamap.DataMapClient.entity.move_entities_to_collection": "Customizations.Entity.moveEntitiesToCollection", + "azure.purview.datamap.DataMapClient.glossary.batch_get": "Customizations.Glossary.batchGet", + "azure.purview.datamap.DataMapClient.glossary.create": "Customizations.Glossary.create", + "azure.purview.datamap.DataMapClient.glossary.create_categories": "Customizations.Glossary.createCategories", + "azure.purview.datamap.DataMapClient.glossary.create_category": "Customizations.Glossary.createCategory", + "azure.purview.datamap.DataMapClient.glossary.get_category": "Customizations.Glossary.getCategory", + "azure.purview.datamap.DataMapClient.glossary.update_category": "Customizations.Glossary.updateCategory", + "azure.purview.datamap.DataMapClient.glossary.delete_category": "Customizations.Glossary.deleteCategory", + "azure.purview.datamap.DataMapClient.glossary.partial_update_category": "Customizations.Glossary.partialUpdateCategory", + "azure.purview.datamap.DataMapClient.glossary.get_related_categories": "Customizations.Glossary.getRelatedCategories", + "azure.purview.datamap.DataMapClient.glossary.get_category_terms": "Customizations.Glossary.getCategoryTerms", + "azure.purview.datamap.DataMapClient.glossary.create_term": "Customizations.Glossary.createTerm", + "azure.purview.datamap.DataMapClient.glossary.get_term": "Customizations.Glossary.getTerm", + "azure.purview.datamap.DataMapClient.glossary.update_term": "Customizations.Glossary.updateTerm", + "azure.purview.datamap.DataMapClient.glossary.delete_term": "Customizations.Glossary.deleteTerm", + "azure.purview.datamap.DataMapClient.glossary.partial_update_term": "Customizations.Glossary.partialUpdateTerm", + "azure.purview.datamap.DataMapClient.glossary.create_terms": "Customizations.Glossary.createTerms", + "azure.purview.datamap.DataMapClient.glossary.get_entities_assigned_with_term": "Customizations.Glossary.getEntitiesAssignedWithTerm", + "azure.purview.datamap.DataMapClient.glossary.assign_term_to_entities": "Customizations.Glossary.assignTermToEntities", + "azure.purview.datamap.DataMapClient.glossary.delete_term_assignment_from_entities": "Customizations.Glossary.deleteTermAssignmentFromEntities", + "azure.purview.datamap.DataMapClient.glossary.get_related_terms": "Customizations.Glossary.getRelatedTerms", + "azure.purview.datamap.DataMapClient.glossary.get": "Customizations.Glossary.get", + "azure.purview.datamap.DataMapClient.glossary.update": "Customizations.Glossary.update", + "azure.purview.datamap.DataMapClient.glossary.delete": "Customizations.Glossary.delete", + "azure.purview.datamap.DataMapClient.glossary.get_categories": "Customizations.Glossary.getCategories", + "azure.purview.datamap.DataMapClient.glossary.get_categories_headers": "Customizations.Glossary.getCategoriesHeaders", + "azure.purview.datamap.DataMapClient.glossary.get_detailed": "Customizations.Glossary.getDetailed", + "azure.purview.datamap.DataMapClient.glossary.partial_update": "Customizations.Glossary.partialUpdate", + "azure.purview.datamap.DataMapClient.glossary.get_terms": "Customizations.Glossary.getTerms", + "azure.purview.datamap.DataMapClient.glossary.get_term_headers": "Customizations.Glossary.getTermHeaders", + "azure.purview.datamap.DataMapClient.discovery.query": "Customizations.Discovery.query", + "azure.purview.datamap.DataMapClient.discovery.suggest": "Customizations.Discovery.suggest", + "azure.purview.datamap.DataMapClient.discovery.auto_complete": "Customizations.Discovery.autoComplete", + "azure.purview.datamap.DataMapClient.lineage.get": "Customizations.Lineage.get", + "azure.purview.datamap.DataMapClient.lineage.get_next_page": "Customizations.Lineage.getNextPage", + "azure.purview.datamap.DataMapClient.lineage.get_by_unique_attribute": "Customizations.Lineage.getByUniqueAttribute", + "azure.purview.datamap.DataMapClient.relationship.create": "Customizations.Relationship.create", + "azure.purview.datamap.DataMapClient.relationship.update": "Customizations.Relationship.update", + "azure.purview.datamap.DataMapClient.relationship.get": "Customizations.Relationship.get", + "azure.purview.datamap.DataMapClient.relationship.delete": "Customizations.Relationship.delete", + "azure.purview.datamap.DataMapClient.type_definition.get_business_metadata_by_id": "Customizations.TypeDefinition.getBusinessMetadataById", + "azure.purview.datamap.DataMapClient.type_definition.get_business_metadata_by_name": "Customizations.TypeDefinition.getBusinessMetadataByName", + "azure.purview.datamap.DataMapClient.type_definition.get_classification_by_id": "Customizations.TypeDefinition.getClassificationById", + "azure.purview.datamap.DataMapClient.type_definition.get_classification_by_name": "Customizations.TypeDefinition.getClassificationByName", + "azure.purview.datamap.DataMapClient.type_definition.get_entity_by_id": "Customizations.TypeDefinition.getEntityById", + "azure.purview.datamap.DataMapClient.type_definition.get_entity_by_name": "Customizations.TypeDefinition.getEntityByName", + "azure.purview.datamap.DataMapClient.type_definition.get_enum_by_id": "Customizations.TypeDefinition.getEnumById", + "azure.purview.datamap.DataMapClient.type_definition.get_enum_by_name": "Customizations.TypeDefinition.getEnumByName", + "azure.purview.datamap.DataMapClient.type_definition.get_relationship_by_id": "Customizations.TypeDefinition.getRelationshipById", + "azure.purview.datamap.DataMapClient.type_definition.get_relationship_by_name": "Customizations.TypeDefinition.getRelationshipByName", + "azure.purview.datamap.DataMapClient.type_definition.get_struct_by_id": "Customizations.TypeDefinition.getStructById", + "azure.purview.datamap.DataMapClient.type_definition.get_struct_by_name": "Customizations.TypeDefinition.getStructByName", + "azure.purview.datamap.DataMapClient.type_definition.get_by_id": "Customizations.TypeDefinition.getById", + "azure.purview.datamap.DataMapClient.type_definition.get_by_name": "Customizations.TypeDefinition.getByName", + "azure.purview.datamap.DataMapClient.type_definition.delete": "Customizations.TypeDefinition.delete", + "azure.purview.datamap.DataMapClient.type_definition.get": "Customizations.TypeDefinition.get", + "azure.purview.datamap.DataMapClient.type_definition.batch_create": "Customizations.TypeDefinition.batchCreate", + "azure.purview.datamap.DataMapClient.type_definition.batch_update": "Customizations.TypeDefinition.batchUpdate", + "azure.purview.datamap.DataMapClient.type_definition.batch_delete": "Customizations.TypeDefinition.batchDelete", + "azure.purview.datamap.DataMapClient.type_definition.get_headers": "Customizations.TypeDefinition.getHeaders", + "azure.purview.datamap.DataMapClient.type_definition.get_term_template_by_id": "Customizations.TypeDefinition.getTermTemplateById", + "azure.purview.datamap.DataMapClient.type_definition.get_term_template_by_name": "Customizations.TypeDefinition.getTermTemplateByName" + } +} \ No newline at end of file diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/_serialization.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/_serialization.py index a066e16a64dd..7a0232de5ddc 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/_serialization.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/_serialization.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. @@ -411,7 +411,7 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) @@ -1361,7 +1361,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/_version.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/_version.py index bbcd28b4aa67..be71c81bd282 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/_version.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0b1" diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/operations/_operations.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/operations/_operations.py index 1db121d52ae9..a6575d687555 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/operations/_operations.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -171,7 +171,7 @@ async def create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of - collections are not well supported. E.g., array`>, array>, array>. For each contact type, the maximum number of contacts is 20. @@ -208,7 +208,7 @@ async def create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of - collections are not well supported. E.g., array`>, array>, array>. For each contact type, the maximum number of contacts is 20. @@ -245,7 +245,7 @@ async def create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of - collections are not well supported. E.g., array`>, array>, array>. For each contact type, the maximum number of contacts is 20. @@ -281,7 +281,7 @@ async def create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of - collections are not well supported. E.g., array`>, array>, array>. For each contact type, the maximum number of contacts is 20. @@ -454,7 +454,7 @@ async def batch_create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array - of collections are not well supported. E.g., array`>, + of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20. @@ -492,7 +492,7 @@ async def batch_create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array - of collections are not well supported. E.g., array`>, + of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20. @@ -530,7 +530,7 @@ async def batch_create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array - of collections are not well supported. E.g., array`>, + of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20. @@ -567,7 +567,7 @@ async def batch_create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array - of collections are not well supported. E.g., array`>, + of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20. @@ -1427,7 +1427,7 @@ async def get_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\\\ :code:``=\\ :code:``. + attr:\\=. NOTE: The attrName and attrValue should be unique across entities, eg. @@ -1524,7 +1524,7 @@ async def update_by_unique_attribute( typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -1567,7 +1567,7 @@ async def update_by_unique_attribute( typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -1610,7 +1610,7 @@ async def update_by_unique_attribute( typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -1652,7 +1652,7 @@ async def update_by_unique_attribute( typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -1743,7 +1743,7 @@ async def delete_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\\\ :code:``=\\\\ :code:``. + attr:\\=\\. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -2266,9 +2266,7 @@ async def batch_get_by_unique_attributes( provided in the following format - typeName=\\\\ :code:``&attr_1:\\\\ :code:``=\\\\ - :code:``&attr_2:\\\\ :code:``=\\\\ :code:``&attr_3:\\\\ - :code:``=\\\\ :code:`` + typeName=\\&attr_1:\\=\\&attr_2:\\=\\&attr_3:\\=\\ NOTE: The attrName should be an unique attribute for the given entity-type. @@ -3341,8 +3339,7 @@ async def remove_labels_by_unique_attribute( in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. NOTE: The attrName and attrValue should be - unique + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. @@ -3382,8 +3379,7 @@ async def remove_labels_by_unique_attribute( in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. NOTE: The attrName and attrValue should be - unique + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. @@ -3422,8 +3418,7 @@ async def remove_labels_by_unique_attribute( in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. NOTE: The attrName and attrValue should be - unique + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. @@ -3510,7 +3505,7 @@ async def set_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -3552,7 +3547,7 @@ async def set_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -3593,7 +3588,7 @@ async def set_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -3684,7 +3679,7 @@ async def add_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -3726,7 +3721,7 @@ async def add_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -3767,7 +3762,7 @@ async def add_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/models/_models.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/models/_models.py index 18ab0afd1525..edd24e376def 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/models/_models.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/models/_models.py @@ -50,32 +50,48 @@ class AtlasAttributeDef(_model_base.Model): :vartype values_min_count: int """ - cardinality: Optional[Union[str, "_models.CardinalityValue"]] = rest_field() + cardinality: Optional[Union[str, "_models.CardinalityValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """single-valued attribute or multi-valued attribute. Known values are: \"SINGLE\", \"LIST\", and \"SET\".""" - constraints: Optional[List["_models.AtlasConstraintDef"]] = rest_field() + constraints: Optional[List["_models.AtlasConstraintDef"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of constraints.""" - default_value: Optional[str] = rest_field(name="defaultValue") + default_value: Optional[str] = rest_field( + name="defaultValue", visibility=["read", "create", "update", "delete", "query"] + ) """The default value of the attribute.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the attribute.""" - include_in_notification: Optional[bool] = rest_field(name="includeInNotification") + include_in_notification: Optional[bool] = rest_field( + name="includeInNotification", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if it is included in notification.""" - is_indexable: Optional[bool] = rest_field(name="isIndexable") + is_indexable: Optional[bool] = rest_field( + name="isIndexable", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if it is indexable.""" - is_optional: Optional[bool] = rest_field(name="isOptional") + is_optional: Optional[bool] = rest_field( + name="isOptional", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if it is optional.""" - is_unique: Optional[bool] = rest_field(name="isUnique") + is_unique: Optional[bool] = rest_field(name="isUnique", visibility=["read", "create", "update", "delete", "query"]) """Determines if it unique.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the attribute.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the attribute.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - values_max_count: Optional[int] = rest_field(name="valuesMaxCount") + values_max_count: Optional[int] = rest_field( + name="valuesMaxCount", visibility=["read", "create", "update", "delete", "query"] + ) """The maximum count of the values.""" - values_min_count: Optional[int] = rest_field(name="valuesMinCount") + values_min_count: Optional[int] = rest_field( + name="valuesMinCount", visibility=["read", "create", "update", "delete", "query"] + ) """The minimum count of the values.""" @overload @@ -145,37 +161,53 @@ class AtlasBusinessMetadataDef(_model_base.Model): :vartype attribute_defs: list[~azure.purview.datamap.models.AtlasAttributeDef] """ - category: Optional[Union[str, "_models.TypeCategory"]] = rest_field() + category: Optional[Union[str, "_models.TypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of type category. Known values are: \"PRIMITIVE\", \"OBJECT_ID_TYPE\", \"ENUM\", \"STRUCT\", \"CLASSIFICATION\", \"ENTITY\", \"ARRAY\", \"MAP\", \"RELATIONSHIP\", and \"TERM_TEMPLATE\".""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - date_formatter: Optional["_models.DateFormat"] = rest_field(name="dateFormatter") + date_formatter: Optional["_models.DateFormat"] = rest_field( + name="dateFormatter", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the type definition.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the type definition.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the type definition.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the type definition.""" - service_type: Optional[str] = rest_field(name="serviceType") + service_type: Optional[str] = rest_field( + name="serviceType", visibility=["read", "create", "update", "delete", "query"] + ) """The service type.""" - type_version: Optional[str] = rest_field(name="typeVersion") + type_version: Optional[str] = rest_field( + name="typeVersion", visibility=["read", "create", "update", "delete", "query"] + ) """The version of the type.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the record.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field(name="attributeDefs") + attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field( + name="attributeDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of attribute definitions.""" @overload @@ -232,20 +264,30 @@ class AtlasClassification(_model_base.Model): :vartype validity_periods: list[~azure.purview.datamap.models.TimeBoundary] """ - attributes: Optional[Dict[str, Any]] = rest_field() + attributes: Optional[Dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The attributes of the struct.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - entity_guid: Optional[str] = rest_field(name="entityGuid") + entity_guid: Optional[str] = rest_field( + name="entityGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the entity.""" - entity_status: Optional[Union[str, "_models.EntityStatus"]] = rest_field(name="entityStatus") + entity_status: Optional[Union[str, "_models.EntityStatus"]] = rest_field( + name="entityStatus", visibility=["read", "create", "update", "delete", "query"] + ) """Status of the entity - can be active or deleted. Deleted entities are not removed. Known values are: \"ACTIVE\" and \"DELETED\".""" - remove_propagations_on_entity_delete: Optional[bool] = rest_field(name="removePropagationsOnEntityDelete") + remove_propagations_on_entity_delete: Optional[bool] = rest_field( + name="removePropagationsOnEntityDelete", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if propagations will be removed on entity deletion.""" - validity_periods: Optional[List["_models.TimeBoundary"]] = rest_field(name="validityPeriods") + validity_periods: Optional[List["_models.TimeBoundary"]] = rest_field( + name="validityPeriods", visibility=["read", "create", "update", "delete", "query"] + ) """An array of time boundaries indicating validity periods.""" @overload @@ -336,39 +378,57 @@ class AtlasClassificationDef(_model_base.Model): :vartype super_types: list[str] """ - category: Optional[Union[str, "_models.TypeCategory"]] = rest_field() + category: Optional[Union[str, "_models.TypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of type category. Known values are: \"PRIMITIVE\", \"OBJECT_ID_TYPE\", \"ENUM\", \"STRUCT\", \"CLASSIFICATION\", \"ENTITY\", \"ARRAY\", \"MAP\", \"RELATIONSHIP\", and \"TERM_TEMPLATE\".""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - date_formatter: Optional["_models.DateFormat"] = rest_field(name="dateFormatter") + date_formatter: Optional["_models.DateFormat"] = rest_field( + name="dateFormatter", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the type definition.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the type definition.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the type definition.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the type definition.""" - service_type: Optional[str] = rest_field(name="serviceType") + service_type: Optional[str] = rest_field( + name="serviceType", visibility=["read", "create", "update", "delete", "query"] + ) """The service type.""" - type_version: Optional[str] = rest_field(name="typeVersion") + type_version: Optional[str] = rest_field( + name="typeVersion", visibility=["read", "create", "update", "delete", "query"] + ) """The version of the type.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the record.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field(name="attributeDefs") + attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field( + name="attributeDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of attribute definitions.""" - entity_types: Optional[List[str]] = rest_field(name="entityTypes") + entity_types: Optional[List[str]] = rest_field( + name="entityTypes", visibility=["read", "create", "update", "delete", "query"] + ) """Specifying a list of entityType names in the classificationDef, ensures that classifications can only be applied to those entityTypes. @@ -390,9 +450,13 @@ class AtlasClassificationDef(_model_base.Model): If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs.""" - sub_types: Optional[List[str]] = rest_field(name="subTypes") + sub_types: Optional[List[str]] = rest_field( + name="subTypes", visibility=["read", "create", "update", "delete", "query"] + ) """An array of sub types.""" - super_types: Optional[List[str]] = rest_field(name="superTypes") + super_types: Optional[List[str]] = rest_field( + name="superTypes", visibility=["read", "create", "update", "delete", "query"] + ) """An array of super types.""" @overload @@ -448,18 +512,24 @@ class AtlasClassifications(_model_base.Model): :vartype total_count: int """ - list: Optional[List[Any]] = rest_field() + list: Optional[List[Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An array of objects.""" - page_size: Optional[int] = rest_field(name="pageSize") + page_size: Optional[int] = rest_field(name="pageSize", visibility=["read", "create", "update", "delete", "query"]) """The size of the page.""" - sort_by: Optional[str] = rest_field(name="sortBy") + sort_by: Optional[str] = rest_field(name="sortBy", visibility=["read", "create", "update", "delete", "query"]) """The sorted by field.""" - sort_type: Optional[Union[str, "_models.SortType"]] = rest_field(name="sortType") + sort_type: Optional[Union[str, "_models.SortType"]] = rest_field( + name="sortType", visibility=["read", "create", "update", "delete", "query"] + ) """to specify whether the result should be sorted? If yes, whether asc or desc. Known values are: \"NONE\", \"ASC\", and \"DESC\".""" - start_index: Optional[int] = rest_field(name="startIndex") + start_index: Optional[int] = rest_field( + name="startIndex", visibility=["read", "create", "update", "delete", "query"] + ) """The start index of the page.""" - total_count: Optional[int] = rest_field(name="totalCount") + total_count: Optional[int] = rest_field( + name="totalCount", visibility=["read", "create", "update", "delete", "query"] + ) """The total count of items.""" @overload @@ -494,9 +564,9 @@ class AtlasConstraintDef(_model_base.Model): :vartype type: str """ - params: Optional[Dict[str, Any]] = rest_field() + params: Optional[Dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The parameters of the constraint definition.""" - type: Optional[str] = rest_field() + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The type of the constraint.""" @overload @@ -528,9 +598,13 @@ class AtlasEntitiesWithExtInfo(_model_base.Model): :vartype entities: list[~azure.purview.datamap.models.AtlasEntity] """ - referred_entities: Optional[Dict[str, "_models.AtlasEntity"]] = rest_field(name="referredEntities") + referred_entities: Optional[Dict[str, "_models.AtlasEntity"]] = rest_field( + name="referredEntities", visibility=["read", "create", "update", "delete", "query"] + ) """The referred entities.""" - entities: Optional[List["_models.AtlasEntity"]] = rest_field() + entities: Optional[List["_models.AtlasEntity"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of entities.""" @overload @@ -555,8 +629,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AtlasEntity(_model_base.Model): """An instance of an entity - like hive_table, hive_database. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar attributes: The attributes of the struct. :vartype attributes: dict[str, any] :ivar type_name: The name of the type. @@ -605,50 +677,74 @@ class AtlasEntity(_model_base.Model): :vartype contacts: dict[str, list[~azure.purview.datamap.models.ContactInfo]] """ - attributes: Optional[Dict[str, Any]] = rest_field() + attributes: Optional[Dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The attributes of the struct.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - business_attributes: Optional[Dict[str, Any]] = rest_field(name="businessAttributes") + business_attributes: Optional[Dict[str, Any]] = rest_field( + name="businessAttributes", visibility=["read", "create", "update", "delete", "query"] + ) """Business attributes.""" - classifications: Optional[List["_models.AtlasClassification"]] = rest_field() + classifications: Optional[List["_models.AtlasClassification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of classifications.""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - custom_attributes: Optional[Dict[str, str]] = rest_field(name="customAttributes") + custom_attributes: Optional[Dict[str, str]] = rest_field( + name="customAttributes", visibility=["read", "create", "update", "delete", "query"] + ) """Custom Attribute.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the entity.""" - home_id: Optional[str] = rest_field(name="homeId") + home_id: Optional[str] = rest_field(name="homeId", visibility=["read", "create", "update", "delete", "query"]) """The home ID of the entity.""" collection_id: Optional[str] = rest_field(name="collectionId", visibility=["read"]) """The collection ID of the entity.""" - is_incomplete: Optional[bool] = rest_field(name="isIncomplete") + is_incomplete: Optional[bool] = rest_field( + name="isIncomplete", visibility=["read", "create", "update", "delete", "query"] + ) """Whether it is a shell entity.""" - labels: Optional[List[str]] = rest_field() + labels: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """labels.""" - meanings: Optional[List["_models.AtlasTermAssignmentHeader"]] = rest_field() + meanings: Optional[List["_models.AtlasTermAssignmentHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of term assignment headers indicating the meanings of the entity.""" - provenance_type: Optional[int] = rest_field(name="provenanceType") + provenance_type: Optional[int] = rest_field( + name="provenanceType", visibility=["read", "create", "update", "delete", "query"] + ) """Used to record the provenance of an instance of an entity or relationship.""" - proxy: Optional[bool] = rest_field() + proxy: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Determines if there's a proxy.""" - relationship_attributes: Optional[Dict[str, Any]] = rest_field(name="relationshipAttributes") + relationship_attributes: Optional[Dict[str, Any]] = rest_field( + name="relationshipAttributes", visibility=["read", "create", "update", "delete", "query"] + ) """The attributes of relationship.""" - status: Optional[Union[str, "_models.EntityStatus"]] = rest_field() + status: Optional[Union[str, "_models.EntityStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Status of the entity - can be active or deleted. Deleted entities are not removed. Known values are: \"ACTIVE\" and \"DELETED\".""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the entity.""" - contacts: Optional[Dict[str, List["_models.ContactInfo"]]] = rest_field() + contacts: Optional[Dict[str, List["_models.ContactInfo"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The dictionary of contacts for entities. Key could be Expert or Owner.""" @overload @@ -733,44 +829,64 @@ class AtlasEntityDef(_model_base.Model): list[~azure.purview.datamap.models.AtlasRelationshipAttributeDef] """ - category: Optional[Union[str, "_models.TypeCategory"]] = rest_field() + category: Optional[Union[str, "_models.TypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of type category. Known values are: \"PRIMITIVE\", \"OBJECT_ID_TYPE\", \"ENUM\", \"STRUCT\", \"CLASSIFICATION\", \"ENTITY\", \"ARRAY\", \"MAP\", \"RELATIONSHIP\", and \"TERM_TEMPLATE\".""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - date_formatter: Optional["_models.DateFormat"] = rest_field(name="dateFormatter") + date_formatter: Optional["_models.DateFormat"] = rest_field( + name="dateFormatter", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the type definition.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the type definition.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the type definition.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the type definition.""" - service_type: Optional[str] = rest_field(name="serviceType") + service_type: Optional[str] = rest_field( + name="serviceType", visibility=["read", "create", "update", "delete", "query"] + ) """The service type.""" - type_version: Optional[str] = rest_field(name="typeVersion") + type_version: Optional[str] = rest_field( + name="typeVersion", visibility=["read", "create", "update", "delete", "query"] + ) """The version of the type.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the record.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field(name="attributeDefs") + attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field( + name="attributeDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of attribute definitions.""" - sub_types: Optional[List[str]] = rest_field(name="subTypes") + sub_types: Optional[List[str]] = rest_field( + name="subTypes", visibility=["read", "create", "update", "delete", "query"] + ) """An array of sub types.""" - super_types: Optional[List[str]] = rest_field(name="superTypes") + super_types: Optional[List[str]] = rest_field( + name="superTypes", visibility=["read", "create", "update", "delete", "query"] + ) """An array of super types.""" relationship_attribute_defs: Optional[List["_models.AtlasRelationshipAttributeDef"]] = rest_field( - name="relationshipAttributeDefs" + name="relationshipAttributeDefs", visibility=["read", "create", "update", "delete", "query"] ) """An array of relationship attributes.""" @@ -839,29 +955,45 @@ class AtlasEntityHeader(_model_base.Model): :vartype status: str or ~azure.purview.datamap.models.EntityStatus """ - attributes: Optional[Dict[str, Any]] = rest_field() + attributes: Optional[Dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The attributes of the struct.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - classification_names: Optional[List[str]] = rest_field(name="classificationNames") + classification_names: Optional[List[str]] = rest_field( + name="classificationNames", visibility=["read", "create", "update", "delete", "query"] + ) """An array of classification names.""" - classifications: Optional[List["_models.AtlasClassification"]] = rest_field() + classifications: Optional[List["_models.AtlasClassification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of classifications.""" - display_text: Optional[str] = rest_field(name="displayText") + display_text: Optional[str] = rest_field( + name="displayText", visibility=["read", "create", "update", "delete", "query"] + ) """The display text.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the record.""" - is_incomplete: Optional[bool] = rest_field(name="isIncomplete") + is_incomplete: Optional[bool] = rest_field( + name="isIncomplete", visibility=["read", "create", "update", "delete", "query"] + ) """Whether it is a shell entity.""" - labels: Optional[List[str]] = rest_field() + labels: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """labels.""" - meaning_names: Optional[List[str]] = rest_field(name="meaningNames") + meaning_names: Optional[List[str]] = rest_field( + name="meaningNames", visibility=["read", "create", "update", "delete", "query"] + ) """An array of meanings.""" - meanings: Optional[List["_models.AtlasTermAssignmentHeader"]] = rest_field() + meanings: Optional[List["_models.AtlasTermAssignmentHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of term assignment headers.""" - status: Optional[Union[str, "_models.EntityStatus"]] = rest_field() + status: Optional[Union[str, "_models.EntityStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Status of the entity - can be active or deleted. Deleted entities are not removed. Known values are: \"ACTIVE\" and \"DELETED\".""" @@ -901,7 +1033,9 @@ class AtlasEntityHeaders(_model_base.Model): :vartype guid_header_map: dict[str, ~azure.purview.datamap.models.AtlasEntityHeader] """ - guid_header_map: Optional[Dict[str, "_models.AtlasEntityHeader"]] = rest_field(name="guidHeaderMap") + guid_header_map: Optional[Dict[str, "_models.AtlasEntityHeader"]] = rest_field( + name="guidHeaderMap", visibility=["read", "create", "update", "delete", "query"] + ) """The description of the guid header map,.""" @overload @@ -932,9 +1066,11 @@ class AtlasEntityWithExtInfo(_model_base.Model): :vartype entity: ~azure.purview.datamap.models.AtlasEntity """ - referred_entities: Optional[Dict[str, "_models.AtlasEntity"]] = rest_field(name="referredEntities") + referred_entities: Optional[Dict[str, "_models.AtlasEntity"]] = rest_field( + name="referredEntities", visibility=["read", "create", "update", "delete", "query"] + ) """The referred entities.""" - entity: Optional["_models.AtlasEntity"] = rest_field() + entity: Optional["_models.AtlasEntity"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An instance of an entity - like hive_table, hive_database.""" @overload @@ -995,39 +1131,57 @@ class AtlasEnumDef(_model_base.Model): :vartype element_defs: list[~azure.purview.datamap.models.AtlasEnumElementDef] """ - category: Optional[Union[str, "_models.TypeCategory"]] = rest_field() + category: Optional[Union[str, "_models.TypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of type category. Known values are: \"PRIMITIVE\", \"OBJECT_ID_TYPE\", \"ENUM\", \"STRUCT\", \"CLASSIFICATION\", \"ENTITY\", \"ARRAY\", \"MAP\", \"RELATIONSHIP\", and \"TERM_TEMPLATE\".""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - date_formatter: Optional["_models.DateFormat"] = rest_field(name="dateFormatter") + date_formatter: Optional["_models.DateFormat"] = rest_field( + name="dateFormatter", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the type definition.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the type definition.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the type definition.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the type definition.""" - service_type: Optional[str] = rest_field(name="serviceType") + service_type: Optional[str] = rest_field( + name="serviceType", visibility=["read", "create", "update", "delete", "query"] + ) """The service type.""" - type_version: Optional[str] = rest_field(name="typeVersion") + type_version: Optional[str] = rest_field( + name="typeVersion", visibility=["read", "create", "update", "delete", "query"] + ) """The version of the type.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the record.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - default_value: Optional[str] = rest_field(name="defaultValue") + default_value: Optional[str] = rest_field( + name="defaultValue", visibility=["read", "create", "update", "delete", "query"] + ) """The default value.""" - element_defs: Optional[List["_models.AtlasEnumElementDef"]] = rest_field(name="elementDefs") + element_defs: Optional[List["_models.AtlasEnumElementDef"]] = rest_field( + name="elementDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of enum element definitions.""" @overload @@ -1074,11 +1228,11 @@ class AtlasEnumElementDef(_model_base.Model): :vartype value: str """ - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the enum element definition.""" - ordinal: Optional[int] = rest_field() + ordinal: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The ordinal of the enum element definition.""" - value: Optional[str] = rest_field() + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The value of the enum element definition.""" @overload @@ -1112,11 +1266,13 @@ class AtlasErrorResponse(_model_base.Model): :vartype error_message: str """ - request_id: Optional[str] = rest_field(name="requestId") + request_id: Optional[str] = rest_field(name="requestId", visibility=["read", "create", "update", "delete", "query"]) """The request ID.""" - error_code: Optional[str] = rest_field(name="errorCode") + error_code: Optional[str] = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) """The error code.""" - error_message: Optional[str] = rest_field(name="errorMessage") + error_message: Optional[str] = rest_field( + name="errorMessage", visibility=["read", "create", "update", "delete", "query"] + ) """The error message.""" @overload @@ -1174,35 +1330,53 @@ class AtlasGlossary(_model_base.Model): :vartype usage: str """ - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the object.""" - classifications: Optional[List["_models.AtlasClassification"]] = rest_field() + classifications: Optional[List["_models.AtlasClassification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of classifications.""" - long_description: Optional[str] = rest_field(name="longDescription") + long_description: Optional[str] = rest_field( + name="longDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The long version description.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the glossary object.""" - qualified_name: Optional[str] = rest_field(name="qualifiedName") + qualified_name: Optional[str] = rest_field( + name="qualifiedName", visibility=["read", "create", "update", "delete", "query"] + ) """The qualified name of the glossary object.""" - short_description: Optional[str] = rest_field(name="shortDescription") + short_description: Optional[str] = rest_field( + name="shortDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The short version of description.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - categories: Optional[List["_models.AtlasRelatedCategoryHeader"]] = rest_field() + categories: Optional[List["_models.AtlasRelatedCategoryHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of categories.""" - language: Optional[str] = rest_field() + language: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The language of the glossary.""" - terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field() + terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers.""" - usage: Optional[str] = rest_field() + usage: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The usage of the glossary.""" @overload @@ -1272,35 +1446,57 @@ class AtlasGlossaryCategory(_model_base.Model): :vartype terms: list[~azure.purview.datamap.models.AtlasRelatedTermHeader] """ - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the object.""" - classifications: Optional[List["_models.AtlasClassification"]] = rest_field() + classifications: Optional[List["_models.AtlasClassification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of classifications.""" - long_description: Optional[str] = rest_field(name="longDescription") + long_description: Optional[str] = rest_field( + name="longDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The long version description.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the glossary object.""" - qualified_name: Optional[str] = rest_field(name="qualifiedName") + qualified_name: Optional[str] = rest_field( + name="qualifiedName", visibility=["read", "create", "update", "delete", "query"] + ) """The qualified name of the glossary object.""" - short_description: Optional[str] = rest_field(name="shortDescription") + short_description: Optional[str] = rest_field( + name="shortDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The short version of description.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - anchor: Optional["_models.AtlasGlossaryHeader"] = rest_field() + anchor: Optional["_models.AtlasGlossaryHeader"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The glossary header with basic information.""" - children_categories: Optional[List["_models.AtlasRelatedCategoryHeader"]] = rest_field(name="childrenCategories") + children_categories: Optional[List["_models.AtlasRelatedCategoryHeader"]] = rest_field( + name="childrenCategories", visibility=["read", "create", "update", "delete", "query"] + ) """An array of children categories.""" - parent_category: Optional["_models.AtlasRelatedCategoryHeader"] = rest_field(name="parentCategory") + parent_category: Optional["_models.AtlasRelatedCategoryHeader"] = rest_field( + name="parentCategory", visibility=["read", "create", "update", "delete", "query"] + ) """The header of the related category.""" - terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field() + terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers.""" @overload @@ -1374,39 +1570,61 @@ class AtlasGlossaryExtInfo(_model_base.Model): :vartype term_info: dict[str, ~azure.purview.datamap.models.AtlasGlossaryTerm] """ - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the object.""" - classifications: Optional[List["_models.AtlasClassification"]] = rest_field() + classifications: Optional[List["_models.AtlasClassification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of classifications.""" - long_description: Optional[str] = rest_field(name="longDescription") + long_description: Optional[str] = rest_field( + name="longDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The long version description.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the glossary object.""" - qualified_name: Optional[str] = rest_field(name="qualifiedName") + qualified_name: Optional[str] = rest_field( + name="qualifiedName", visibility=["read", "create", "update", "delete", "query"] + ) """The qualified name of the glossary object.""" - short_description: Optional[str] = rest_field(name="shortDescription") + short_description: Optional[str] = rest_field( + name="shortDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The short version of description.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - categories: Optional[List["_models.AtlasRelatedCategoryHeader"]] = rest_field() + categories: Optional[List["_models.AtlasRelatedCategoryHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of categories.""" - language: Optional[str] = rest_field() + language: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The language of the glossary.""" - terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field() + terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers.""" - usage: Optional[str] = rest_field() + usage: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The usage of the glossary.""" - category_info: Optional[Dict[str, "_models.AtlasGlossaryCategory"]] = rest_field(name="categoryInfo") + category_info: Optional[Dict[str, "_models.AtlasGlossaryCategory"]] = rest_field( + name="categoryInfo", visibility=["read", "create", "update", "delete", "query"] + ) """The glossary category information.""" - term_info: Optional[Dict[str, "_models.AtlasGlossaryTerm"]] = rest_field(name="termInfo") + term_info: Optional[Dict[str, "_models.AtlasGlossaryTerm"]] = rest_field( + name="termInfo", visibility=["read", "create", "update", "delete", "query"] + ) """The glossary term information.""" @overload @@ -1454,11 +1672,17 @@ class AtlasGlossaryHeader(_model_base.Model): :vartype relation_guid: str """ - display_text: Optional[str] = rest_field(name="displayText") + display_text: Optional[str] = rest_field( + name="displayText", visibility=["read", "create", "update", "delete", "query"] + ) """The display text.""" - glossary_guid: Optional[str] = rest_field(name="glossaryGuid") + glossary_guid: Optional[str] = rest_field( + name="glossaryGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the glossary.""" - relation_guid: Optional[str] = rest_field(name="relationGuid") + relation_guid: Optional[str] = rest_field( + name="relationGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the relationship.""" @overload @@ -1563,82 +1787,140 @@ class AtlasGlossaryTerm(_model_base.Model): :vartype valid_values_for: list[~azure.purview.datamap.models.AtlasRelatedTermHeader] """ - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the object.""" - classifications: Optional[List["_models.AtlasClassification"]] = rest_field() + classifications: Optional[List["_models.AtlasClassification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of classifications.""" - long_description: Optional[str] = rest_field(name="longDescription") + long_description: Optional[str] = rest_field( + name="longDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The long version description.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the glossary object.""" - qualified_name: Optional[str] = rest_field(name="qualifiedName") + qualified_name: Optional[str] = rest_field( + name="qualifiedName", visibility=["read", "create", "update", "delete", "query"] + ) """The qualified name of the glossary object.""" - short_description: Optional[str] = rest_field(name="shortDescription") + short_description: Optional[str] = rest_field( + name="shortDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The short version of description.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - abbreviation: Optional[str] = rest_field() + abbreviation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The abbreviation of the term.""" - template_name: Optional[List[Any]] = rest_field(name="templateName") + template_name: Optional[List[Any]] = rest_field( + name="templateName", visibility=["read", "create", "update", "delete", "query"] + ) """The name of the template.""" - anchor: Optional["_models.AtlasGlossaryHeader"] = rest_field() + anchor: Optional["_models.AtlasGlossaryHeader"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The glossary header with basic information.""" - antonyms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field() + antonyms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers as antonyms.""" - status: Optional[Union[str, "_models.TermStatus"]] = rest_field() + status: Optional[Union[str, "_models.TermStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Status of the AtlasGlossaryTerm. Known values are: \"Draft\", \"Approved\", \"Alert\", and \"Expired\".""" - nick_name: Optional[str] = rest_field(name="nickName") + nick_name: Optional[str] = rest_field(name="nickName", visibility=["read", "create", "update", "delete", "query"]) """The nick name of the term.""" - hierarchy_info: Optional[List["_models.PurviewObjectId"]] = rest_field(name="hierarchyInfo") + hierarchy_info: Optional[List["_models.PurviewObjectId"]] = rest_field( + name="hierarchyInfo", visibility=["read", "create", "update", "delete", "query"] + ) """The hierarchy information of the term.""" - resources: Optional[List["_models.ResourceLink"]] = rest_field() + resources: Optional[List["_models.ResourceLink"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of resource link for term.""" - contacts: Optional[Dict[str, List["_models.ContactInfo"]]] = rest_field() + contacts: Optional[Dict[str, List["_models.ContactInfo"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The dictionary of contacts for terms. Key could be Expert or Steward.""" - attributes: Optional[Dict[str, Dict[str, Any]]] = rest_field() + attributes: Optional[Dict[str, Dict[str, Any]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The custom attributes of the term, which is map>. The key of the first layer map is term template name.""" - assigned_entities: Optional[List["_models.AtlasRelatedObjectId"]] = rest_field(name="assignedEntities") + assigned_entities: Optional[List["_models.AtlasRelatedObjectId"]] = rest_field( + name="assignedEntities", visibility=["read", "create", "update", "delete", "query"] + ) """An array of related object IDs.""" - categories: Optional[List["_models.AtlasTermCategorizationHeader"]] = rest_field() + categories: Optional[List["_models.AtlasTermCategorizationHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of term categorization headers.""" - classifies: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field() + classifies: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers.""" - examples: Optional[List[str]] = rest_field() + examples: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An array of examples.""" - is_a: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="isA") + is_a: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="isA", visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers indicating the is-a relationship.""" - preferred_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="preferredTerms") + preferred_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="preferredTerms", visibility=["read", "create", "update", "delete", "query"] + ) """An array of preferred related term headers.""" - preferred_to_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="preferredToTerms") + preferred_to_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="preferredToTerms", visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers that are preferred to.""" - replaced_by: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="replacedBy") + replaced_by: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="replacedBy", visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers that are replaced by.""" - replacement_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="replacementTerms") + replacement_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="replacementTerms", visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers for replacement.""" - see_also: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="seeAlso") + see_also: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="seeAlso", visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers for see also.""" - synonyms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field() + synonyms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers as synonyms.""" - translated_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="translatedTerms") + translated_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="translatedTerms", visibility=["read", "create", "update", "delete", "query"] + ) """An array of translated related term headers.""" - translation_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="translationTerms") + translation_terms: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="translationTerms", visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers for translation.""" - usage: Optional[str] = rest_field() + usage: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The usage of the term.""" - valid_values: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="validValues") + valid_values: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="validValues", visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers as valid values.""" - valid_values_for: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field(name="validValuesFor") + valid_values_for: Optional[List["_models.AtlasRelatedTermHeader"]] = rest_field( + name="validValuesFor", visibility=["read", "create", "update", "delete", "query"] + ) """An array of related term headers as valid values for other records.""" @overload @@ -1719,23 +2001,41 @@ class AtlasLineageInfo(_model_base.Model): :vartype relations: list[~azure.purview.datamap.models.LineageRelation] """ - base_entity_guid: Optional[str] = rest_field(name="baseEntityGuid") + base_entity_guid: Optional[str] = rest_field( + name="baseEntityGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the base entity.""" - guid_entity_map: Optional[Dict[str, "_models.AtlasEntityHeader"]] = rest_field(name="guidEntityMap") + guid_entity_map: Optional[Dict[str, "_models.AtlasEntityHeader"]] = rest_field( + name="guidEntityMap", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID entity map.""" - width_counts: Optional[Dict[str, Dict[str, Any]]] = rest_field(name="widthCounts") + width_counts: Optional[Dict[str, Dict[str, Any]]] = rest_field( + name="widthCounts", visibility=["read", "create", "update", "delete", "query"] + ) """The entity count in specific direction.""" - lineage_depth: Optional[int] = rest_field(name="lineageDepth") + lineage_depth: Optional[int] = rest_field( + name="lineageDepth", visibility=["read", "create", "update", "delete", "query"] + ) """The depth of lineage.""" - lineage_width: Optional[int] = rest_field(name="lineageWidth") + lineage_width: Optional[int] = rest_field( + name="lineageWidth", visibility=["read", "create", "update", "delete", "query"] + ) """The width of lineage.""" - children_count: Optional[int] = rest_field(name="childrenCount") + children_count: Optional[int] = rest_field( + name="childrenCount", visibility=["read", "create", "update", "delete", "query"] + ) """The number of children node.""" - lineage_direction: Optional[Union[str, "_models.LineageDirection"]] = rest_field(name="lineageDirection") + lineage_direction: Optional[Union[str, "_models.LineageDirection"]] = rest_field( + name="lineageDirection", visibility=["read", "create", "update", "delete", "query"] + ) """The enum of lineage direction. Known values are: \"INPUT\", \"OUTPUT\", and \"BOTH\".""" - parent_relations: Optional[List["_models.ParentRelation"]] = rest_field(name="parentRelations") + parent_relations: Optional[List["_models.ParentRelation"]] = rest_field( + name="parentRelations", visibility=["read", "create", "update", "delete", "query"] + ) """An array of parentRelations relations.""" - relations: Optional[List["_models.LineageRelation"]] = rest_field() + relations: Optional[List["_models.LineageRelation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of lineage relations.""" @overload @@ -1775,11 +2075,13 @@ class AtlasObjectId(_model_base.Model): :vartype unique_attributes: dict[str, any] """ - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the object.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - unique_attributes: Optional[Dict[str, Any]] = rest_field(name="uniqueAttributes") + unique_attributes: Optional[Dict[str, Any]] = rest_field( + name="uniqueAttributes", visibility=["read", "create", "update", "delete", "query"] + ) """The unique attributes of the object.""" @overload @@ -1817,15 +2119,23 @@ class AtlasRelatedCategoryHeader(_model_base.Model): :vartype relation_guid: str """ - category_guid: Optional[str] = rest_field(name="categoryGuid") + category_guid: Optional[str] = rest_field( + name="categoryGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the category.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the category header.""" - display_text: Optional[str] = rest_field(name="displayText") + display_text: Optional[str] = rest_field( + name="displayText", visibility=["read", "create", "update", "delete", "query"] + ) """The display text.""" - parent_category_guid: Optional[str] = rest_field(name="parentCategoryGuid") + parent_category_guid: Optional[str] = rest_field( + name="parentCategoryGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the parent category.""" - relation_guid: Optional[str] = rest_field(name="relationGuid") + relation_guid: Optional[str] = rest_field( + name="relationGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the relationship.""" @overload @@ -1878,25 +2188,39 @@ class AtlasRelatedObjectId(_model_base.Model): :vartype relationship_status: str or ~azure.purview.datamap.models.StatusAtlasRelationship """ - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the object.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - unique_attributes: Optional[Dict[str, Any]] = rest_field(name="uniqueAttributes") + unique_attributes: Optional[Dict[str, Any]] = rest_field( + name="uniqueAttributes", visibility=["read", "create", "update", "delete", "query"] + ) """The unique attributes of the object.""" - display_text: Optional[str] = rest_field(name="displayText") + display_text: Optional[str] = rest_field( + name="displayText", visibility=["read", "create", "update", "delete", "query"] + ) """The display text.""" - entity_status: Optional[Union[str, "_models.EntityStatus"]] = rest_field(name="entityStatus") + entity_status: Optional[Union[str, "_models.EntityStatus"]] = rest_field( + name="entityStatus", visibility=["read", "create", "update", "delete", "query"] + ) """Status of the entity - can be active or deleted. Deleted entities are not removed. Known values are: \"ACTIVE\" and \"DELETED\".""" - relationship_type: Optional[str] = rest_field(name="relationshipType") + relationship_type: Optional[str] = rest_field( + name="relationshipType", visibility=["read", "create", "update", "delete", "query"] + ) """Relationship type.""" - relationship_attributes: Optional["_models.AtlasStruct"] = rest_field(name="relationshipAttributes") + relationship_attributes: Optional["_models.AtlasStruct"] = rest_field( + name="relationshipAttributes", visibility=["read", "create", "update", "delete", "query"] + ) """Captures details of struct contents. Not instantiated directly, used only via AtlasEntity, AtlasClassification.""" - relationship_guid: Optional[str] = rest_field(name="relationshipGuid") + relationship_guid: Optional[str] = rest_field( + name="relationshipGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the relationship.""" - relationship_status: Optional[Union[str, "_models.StatusAtlasRelationship"]] = rest_field(name="relationshipStatus") + relationship_status: Optional[Union[str, "_models.StatusAtlasRelationship"]] = rest_field( + name="relationshipStatus", visibility=["read", "create", "update", "delete", "query"] + ) """The enum of relationship status. Known values are: \"ACTIVE\" and \"DELETED\".""" @overload @@ -1945,20 +2269,26 @@ class AtlasRelatedTermHeader(_model_base.Model): :vartype term_guid: str """ - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the related term.""" - display_text: Optional[str] = rest_field(name="displayText") + display_text: Optional[str] = rest_field( + name="displayText", visibility=["read", "create", "update", "delete", "query"] + ) """The display text.""" - expression: Optional[str] = rest_field() + expression: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The expression of the term.""" - relation_guid: Optional[str] = rest_field(name="relationGuid") + relation_guid: Optional[str] = rest_field( + name="relationGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the relationship.""" - status: Optional[Union[str, "_models.AtlasTermRelationshipStatus"]] = rest_field() + status: Optional[Union[str, "_models.AtlasTermRelationshipStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The status of term relationship. Known values are: \"DRAFT\", \"ACTIVE\", \"DEPRECATED\", \"OBSOLETE\", and \"OTHER\".""" - steward: Optional[str] = rest_field() + steward: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The steward of the term.""" - term_guid: Optional[str] = rest_field(name="termGuid") + term_guid: Optional[str] = rest_field(name="termGuid", visibility=["read", "create", "update", "delete", "query"]) """The GUID of the term.""" @overload @@ -2021,35 +2351,45 @@ class AtlasRelationship(_model_base.Model): :vartype version: int """ - attributes: Optional[Dict[str, Any]] = rest_field() + attributes: Optional[Dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The attributes of the struct.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - end1: Optional["_models.AtlasObjectId"] = rest_field() + end1: Optional["_models.AtlasObjectId"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Reference to an object-instance of a type - like entity.""" - end2: Optional["_models.AtlasObjectId"] = rest_field() + end2: Optional["_models.AtlasObjectId"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Reference to an object-instance of a type - like entity.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the relationship.""" - home_id: Optional[str] = rest_field(name="homeId") + home_id: Optional[str] = rest_field(name="homeId", visibility=["read", "create", "update", "delete", "query"]) """The home ID of the relationship.""" - label: Optional[str] = rest_field() + label: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The label of the relationship.""" - provenance_type: Optional[int] = rest_field(name="provenanceType") + provenance_type: Optional[int] = rest_field( + name="provenanceType", visibility=["read", "create", "update", "delete", "query"] + ) """Used to record the provenance of an instance of an entity or relationship.""" - status: Optional[Union[str, "_models.StatusAtlasRelationship"]] = rest_field() + status: Optional[Union[str, "_models.StatusAtlasRelationship"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of relationship status. Known values are: \"ACTIVE\" and \"DELETED\".""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the relationship.""" @overload @@ -2123,36 +2463,56 @@ class AtlasRelationshipAttributeDef(_model_base.Model): :vartype relationship_type_name: str """ - cardinality: Optional[Union[str, "_models.CardinalityValue"]] = rest_field() + cardinality: Optional[Union[str, "_models.CardinalityValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """single-valued attribute or multi-valued attribute. Known values are: \"SINGLE\", \"LIST\", and \"SET\".""" - constraints: Optional[List["_models.AtlasConstraintDef"]] = rest_field() + constraints: Optional[List["_models.AtlasConstraintDef"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of constraints.""" - default_value: Optional[str] = rest_field(name="defaultValue") + default_value: Optional[str] = rest_field( + name="defaultValue", visibility=["read", "create", "update", "delete", "query"] + ) """The default value of the attribute.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the attribute.""" - include_in_notification: Optional[bool] = rest_field(name="includeInNotification") + include_in_notification: Optional[bool] = rest_field( + name="includeInNotification", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if it is included in notification.""" - is_indexable: Optional[bool] = rest_field(name="isIndexable") + is_indexable: Optional[bool] = rest_field( + name="isIndexable", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if it is indexable.""" - is_optional: Optional[bool] = rest_field(name="isOptional") + is_optional: Optional[bool] = rest_field( + name="isOptional", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if it is optional.""" - is_unique: Optional[bool] = rest_field(name="isUnique") + is_unique: Optional[bool] = rest_field(name="isUnique", visibility=["read", "create", "update", "delete", "query"]) """Determines if it unique.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the attribute.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the attribute.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - values_max_count: Optional[int] = rest_field(name="valuesMaxCount") + values_max_count: Optional[int] = rest_field( + name="valuesMaxCount", visibility=["read", "create", "update", "delete", "query"] + ) """The maximum count of the values.""" - values_min_count: Optional[int] = rest_field(name="valuesMinCount") + values_min_count: Optional[int] = rest_field( + name="valuesMinCount", visibility=["read", "create", "update", "delete", "query"] + ) """The minimum count of the values.""" - is_legacy_attribute: Optional[bool] = rest_field(name="isLegacyAttribute") + is_legacy_attribute: Optional[bool] = rest_field( + name="isLegacyAttribute", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if it is a legacy attribute.""" - relationship_type_name: Optional[str] = rest_field(name="relationshipTypeName") + relationship_type_name: Optional[str] = rest_field( + name="relationshipTypeName", visibility=["read", "create", "update", "delete", "query"] + ) """The name of the relationship type.""" @overload @@ -2284,50 +2644,70 @@ class AtlasRelationshipDef(_model_base.Model): :vartype relationship_label: str """ - category: Optional[Union[str, "_models.TypeCategory"]] = rest_field() + category: Optional[Union[str, "_models.TypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of type category. Known values are: \"PRIMITIVE\", \"OBJECT_ID_TYPE\", \"ENUM\", \"STRUCT\", \"CLASSIFICATION\", \"ENTITY\", \"ARRAY\", \"MAP\", \"RELATIONSHIP\", and \"TERM_TEMPLATE\".""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - date_formatter: Optional["_models.DateFormat"] = rest_field(name="dateFormatter") + date_formatter: Optional["_models.DateFormat"] = rest_field( + name="dateFormatter", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the type definition.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the type definition.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the type definition.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the type definition.""" - service_type: Optional[str] = rest_field(name="serviceType") + service_type: Optional[str] = rest_field( + name="serviceType", visibility=["read", "create", "update", "delete", "query"] + ) """The service type.""" - type_version: Optional[str] = rest_field(name="typeVersion") + type_version: Optional[str] = rest_field( + name="typeVersion", visibility=["read", "create", "update", "delete", "query"] + ) """The version of the type.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the record.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field(name="attributeDefs") + attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field( + name="attributeDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of attribute definitions.""" - end_def1: Optional["_models.AtlasRelationshipEndDef"] = rest_field(name="endDef1") + end_def1: Optional["_models.AtlasRelationshipEndDef"] = rest_field( + name="endDef1", visibility=["read", "create", "update", "delete", "query"] + ) """The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.""" - end_def2: Optional["_models.AtlasRelationshipEndDef"] = rest_field(name="endDef2") + end_def2: Optional["_models.AtlasRelationshipEndDef"] = rest_field( + name="endDef2", visibility=["read", "create", "update", "delete", "query"] + ) """The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.""" relationship_category: Optional[Union[str, "_models.RelationshipCategory"]] = rest_field( - name="relationshipCategory" + name="relationshipCategory", visibility=["read", "create", "update", "delete", "query"] ) """The Relationship category determines the style of relationship around containment and lifecycle. @@ -2338,7 +2718,9 @@ class AtlasRelationshipDef(_model_base.Model): In the COMPOSITION case, the children cannot exist without the container. For AGGREGATION, the life cycles of the container and children are totally independent. Known values are: \"ASSOCIATION\", \"AGGREGATION\", and \"COMPOSITION\".""" - relationship_label: Optional[str] = rest_field(name="relationshipLabel") + relationship_label: Optional[str] = rest_field( + name="relationshipLabel", visibility=["read", "create", "update", "delete", "query"] + ) """The label of the relationship.""" @overload @@ -2398,18 +2780,24 @@ class AtlasRelationshipEndDef(_model_base.Model): :vartype type: str """ - cardinality: Optional[Union[str, "_models.CardinalityValue"]] = rest_field() + cardinality: Optional[Union[str, "_models.CardinalityValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """single-valued attribute or multi-valued attribute. Known values are: \"SINGLE\", \"LIST\", and \"SET\".""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the relationship end definition.""" - is_container: Optional[bool] = rest_field(name="isContainer") + is_container: Optional[bool] = rest_field( + name="isContainer", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if it is container.""" - is_legacy_attribute: Optional[bool] = rest_field(name="isLegacyAttribute") + is_legacy_attribute: Optional[bool] = rest_field( + name="isLegacyAttribute", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if it is a legacy attribute.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the relationship end definition.""" - type: Optional[str] = rest_field() + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The type of the relationship end.""" @overload @@ -2444,9 +2832,13 @@ class AtlasRelationshipWithExtInfo(_model_base.Model): :vartype relationship: ~azure.purview.datamap.models.AtlasRelationship """ - referred_entities: Optional[Dict[str, "_models.AtlasEntityHeader"]] = rest_field(name="referredEntities") + referred_entities: Optional[Dict[str, "_models.AtlasEntityHeader"]] = rest_field( + name="referredEntities", visibility=["read", "create", "update", "delete", "query"] + ) """The referred entity header.""" - relationship: Optional["_models.AtlasRelationship"] = rest_field() + relationship: Optional["_models.AtlasRelationship"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Atlas relationship instance.""" @overload @@ -2480,11 +2872,13 @@ class AtlasStruct(_model_base.Model): :vartype last_modified_ts: str """ - attributes: Optional[Dict[str, Any]] = rest_field() + attributes: Optional[Dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The attributes of the struct.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" @overload @@ -2544,37 +2938,53 @@ class AtlasStructDef(_model_base.Model): :vartype attribute_defs: list[~azure.purview.datamap.models.AtlasAttributeDef] """ - category: Optional[Union[str, "_models.TypeCategory"]] = rest_field() + category: Optional[Union[str, "_models.TypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of type category. Known values are: \"PRIMITIVE\", \"OBJECT_ID_TYPE\", \"ENUM\", \"STRUCT\", \"CLASSIFICATION\", \"ENTITY\", \"ARRAY\", \"MAP\", \"RELATIONSHIP\", and \"TERM_TEMPLATE\".""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - date_formatter: Optional["_models.DateFormat"] = rest_field(name="dateFormatter") + date_formatter: Optional["_models.DateFormat"] = rest_field( + name="dateFormatter", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the type definition.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the type definition.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the type definition.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the type definition.""" - service_type: Optional[str] = rest_field(name="serviceType") + service_type: Optional[str] = rest_field( + name="serviceType", visibility=["read", "create", "update", "delete", "query"] + ) """The service type.""" - type_version: Optional[str] = rest_field(name="typeVersion") + type_version: Optional[str] = rest_field( + name="typeVersion", visibility=["read", "create", "update", "delete", "query"] + ) """The version of the type.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the record.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field(name="attributeDefs") + attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field( + name="attributeDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of attribute definitions.""" @overload @@ -2633,24 +3043,30 @@ class AtlasTermAssignmentHeader(_model_base.Model): :vartype term_guid: str """ - confidence: Optional[int] = rest_field() + confidence: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The confidence of the term assignment.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the term assignment.""" - display_text: Optional[str] = rest_field(name="displayText") + display_text: Optional[str] = rest_field( + name="displayText", visibility=["read", "create", "update", "delete", "query"] + ) """The display text.""" - expression: Optional[str] = rest_field() + expression: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The expression of the term assignment.""" - relation_guid: Optional[str] = rest_field(name="relationGuid") + relation_guid: Optional[str] = rest_field( + name="relationGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the relationship.""" - status: Optional[Union[str, "_models.AtlasTermAssignmentStatus"]] = rest_field() + status: Optional[Union[str, "_models.AtlasTermAssignmentStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The status of terms assignment. Known values are: \"DISCOVERED\", \"PROPOSED\", \"IMPORTED\", \"VALIDATED\", \"DEPRECATED\", \"OBSOLETE\", and \"OTHER\".""" - steward: Optional[str] = rest_field() + steward: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The steward of the term.""" - term_guid: Optional[str] = rest_field(name="termGuid") + term_guid: Optional[str] = rest_field(name="termGuid", visibility=["read", "create", "update", "delete", "query"]) """The GUID of the term.""" @overload @@ -2695,15 +3111,23 @@ class AtlasTermCategorizationHeader(_model_base.Model): :vartype status: str or ~azure.purview.datamap.models.AtlasTermRelationshipStatus """ - category_guid: Optional[str] = rest_field(name="categoryGuid") + category_guid: Optional[str] = rest_field( + name="categoryGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the category.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the record.""" - display_text: Optional[str] = rest_field(name="displayText") + display_text: Optional[str] = rest_field( + name="displayText", visibility=["read", "create", "update", "delete", "query"] + ) """The display text.""" - relation_guid: Optional[str] = rest_field(name="relationGuid") + relation_guid: Optional[str] = rest_field( + name="relationGuid", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the relationship.""" - status: Optional[Union[str, "_models.AtlasTermRelationshipStatus"]] = rest_field() + status: Optional[Union[str, "_models.AtlasTermRelationshipStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The status of term relationship. Known values are: \"DRAFT\", \"ACTIVE\", \"DEPRECATED\", \"OBSOLETE\", and \"OTHER\".""" @@ -2825,37 +3249,53 @@ class AtlasTypeDef(_model_base.Model): :vartype attribute_defs: list[~azure.purview.datamap.models.AtlasAttributeDef] """ - category: Optional[Union[str, "_models.TypeCategory"]] = rest_field() + category: Optional[Union[str, "_models.TypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of type category. Known values are: \"PRIMITIVE\", \"OBJECT_ID_TYPE\", \"ENUM\", \"STRUCT\", \"CLASSIFICATION\", \"ENTITY\", \"ARRAY\", \"MAP\", \"RELATIONSHIP\", and \"TERM_TEMPLATE\".""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - date_formatter: Optional["_models.DateFormat"] = rest_field(name="dateFormatter") + date_formatter: Optional["_models.DateFormat"] = rest_field( + name="dateFormatter", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the type definition.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the type definition.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the type definition.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the type definition.""" - service_type: Optional[str] = rest_field(name="serviceType") + service_type: Optional[str] = rest_field( + name="serviceType", visibility=["read", "create", "update", "delete", "query"] + ) """The service type.""" - type_version: Optional[str] = rest_field(name="typeVersion") + type_version: Optional[str] = rest_field( + name="typeVersion", visibility=["read", "create", "update", "delete", "query"] + ) """The version of the type.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the record.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - entity_types: Optional[List[str]] = rest_field(name="entityTypes") + entity_types: Optional[List[str]] = rest_field( + name="entityTypes", visibility=["read", "create", "update", "delete", "query"] + ) """Specifying a list of entityType names in the classificationDef, ensures that classifications can only be applied to those entityTypes. @@ -2877,30 +3317,42 @@ class AtlasTypeDef(_model_base.Model): If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs.""" - sub_types: Optional[List[str]] = rest_field(name="subTypes") + sub_types: Optional[List[str]] = rest_field( + name="subTypes", visibility=["read", "create", "update", "delete", "query"] + ) """An array of sub types.""" - super_types: Optional[List[str]] = rest_field(name="superTypes") + super_types: Optional[List[str]] = rest_field( + name="superTypes", visibility=["read", "create", "update", "delete", "query"] + ) """An array of super types.""" relationship_attribute_defs: Optional[List["_models.AtlasRelationshipAttributeDef"]] = rest_field( - name="relationshipAttributeDefs" + name="relationshipAttributeDefs", visibility=["read", "create", "update", "delete", "query"] ) """An array of relationship attributes.""" - default_value: Optional[str] = rest_field(name="defaultValue") + default_value: Optional[str] = rest_field( + name="defaultValue", visibility=["read", "create", "update", "delete", "query"] + ) """The default value.""" - element_defs: Optional[List["_models.AtlasEnumElementDef"]] = rest_field(name="elementDefs") + element_defs: Optional[List["_models.AtlasEnumElementDef"]] = rest_field( + name="elementDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of enum element definitions.""" - end_def1: Optional["_models.AtlasRelationshipEndDef"] = rest_field(name="endDef1") + end_def1: Optional["_models.AtlasRelationshipEndDef"] = rest_field( + name="endDef1", visibility=["read", "create", "update", "delete", "query"] + ) """The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.""" - end_def2: Optional["_models.AtlasRelationshipEndDef"] = rest_field(name="endDef2") + end_def2: Optional["_models.AtlasRelationshipEndDef"] = rest_field( + name="endDef2", visibility=["read", "create", "update", "delete", "query"] + ) """The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.""" relationship_category: Optional[Union[str, "_models.RelationshipCategory"]] = rest_field( - name="relationshipCategory" + name="relationshipCategory", visibility=["read", "create", "update", "delete", "query"] ) """The Relationship category determines the style of relationship around containment and lifecycle. @@ -2913,9 +3365,13 @@ class AtlasTypeDef(_model_base.Model): In the COMPOSITION case, the children cannot exist without the container. For AGGREGATION, the life cycles of the container and children are totally independent. Known values are: \"ASSOCIATION\", \"AGGREGATION\", and \"COMPOSITION\".""" - relationship_label: Optional[str] = rest_field(name="relationshipLabel") + relationship_label: Optional[str] = rest_field( + name="relationshipLabel", visibility=["read", "create", "update", "delete", "query"] + ) """The label of the relationship.""" - attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field(name="attributeDefs") + attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field( + name="attributeDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of attribute definitions.""" @overload @@ -2973,13 +3429,15 @@ class AtlasTypeDefHeader(_model_base.Model): :vartype name: str """ - category: Optional[Union[str, "_models.TypeCategory"]] = rest_field() + category: Optional[Union[str, "_models.TypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of type category. Known values are: \"PRIMITIVE\", \"OBJECT_ID_TYPE\", \"ENUM\", \"STRUCT\", \"CLASSIFICATION\", \"ENTITY\", \"ARRAY\", \"MAP\", \"RELATIONSHIP\", and \"TERM_TEMPLATE\".""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the type definition.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the type definition.""" @overload @@ -3021,19 +3479,33 @@ class AtlasTypesDef(_model_base.Model): :vartype term_template_defs: list[~azure.purview.datamap.models.TermTemplateDef] """ - business_metadata_defs: Optional[List["_models.AtlasBusinessMetadataDef"]] = rest_field(name="businessMetadataDefs") + business_metadata_defs: Optional[List["_models.AtlasBusinessMetadataDef"]] = rest_field( + name="businessMetadataDefs", visibility=["read", "create", "update", "delete", "query"] + ) """businessMetadataDefs.""" - classification_defs: Optional[List["_models.AtlasClassificationDef"]] = rest_field(name="classificationDefs") + classification_defs: Optional[List["_models.AtlasClassificationDef"]] = rest_field( + name="classificationDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of classification definitions.""" - entity_defs: Optional[List["_models.AtlasEntityDef"]] = rest_field(name="entityDefs") + entity_defs: Optional[List["_models.AtlasEntityDef"]] = rest_field( + name="entityDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of entity definitions.""" - enum_defs: Optional[List["_models.AtlasEnumDef"]] = rest_field(name="enumDefs") + enum_defs: Optional[List["_models.AtlasEnumDef"]] = rest_field( + name="enumDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of enum definitions.""" - relationship_defs: Optional[List["_models.AtlasRelationshipDef"]] = rest_field(name="relationshipDefs") + relationship_defs: Optional[List["_models.AtlasRelationshipDef"]] = rest_field( + name="relationshipDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of relationship definitions.""" - struct_defs: Optional[List["_models.AtlasStructDef"]] = rest_field(name="structDefs") + struct_defs: Optional[List["_models.AtlasStructDef"]] = rest_field( + name="structDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of struct definitions.""" - term_template_defs: Optional[List["_models.TermTemplateDef"]] = rest_field(name="termTemplateDefs") + term_template_defs: Optional[List["_models.TermTemplateDef"]] = rest_field( + name="termTemplateDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of term template definitions.""" @overload @@ -3073,13 +3545,13 @@ class AutoCompleteOptions(_model_base.Model): :vartype filter: any """ - keywords: Optional[str] = rest_field() + keywords: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The keywords applied to all fields that support autocomplete operation. It must be at least 1 character, and no more than 100 characters.""" - limit: Optional[int] = rest_field() + limit: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The number of autocomplete results we hope to return. The default value is 50. The value must be a number between 1 and 100.""" - filter: Optional[Any] = rest_field() + filter: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The filter for the autocomplete request.""" @overload @@ -3109,7 +3581,9 @@ class AutoCompleteResult(_model_base.Model): :vartype value: list[~azure.purview.datamap.models.AutoCompleteResultValue] """ - value: Optional[List["_models.AutoCompleteResultValue"]] = rest_field() + value: Optional[List["_models.AutoCompleteResultValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The result value.""" @overload @@ -3139,9 +3613,11 @@ class AutoCompleteResultValue(_model_base.Model): :vartype query_plus_text: str """ - text: Optional[str] = rest_field() + text: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The completed term or phrase.""" - query_plus_text: Optional[str] = rest_field(name="queryPlusText") + query_plus_text: Optional[str] = rest_field( + name="queryPlusText", visibility=["read", "create", "update", "delete", "query"] + ) """The completed search query text.""" @overload @@ -3172,9 +3648,13 @@ class BulkImportResult(_model_base.Model): :vartype success_import_info_list: list[~azure.purview.datamap.models.ImportInfo] """ - failed_import_info_list: Optional[List["_models.ImportInfo"]] = rest_field(name="failedImportInfoList") + failed_import_info_list: Optional[List["_models.ImportInfo"]] = rest_field( + name="failedImportInfoList", visibility=["read", "create", "update", "delete", "query"] + ) """failed importInfoList.""" - success_import_info_list: Optional[List["_models.ImportInfo"]] = rest_field(name="successImportInfoList") + success_import_info_list: Optional[List["_models.ImportInfo"]] = rest_field( + name="successImportInfoList", visibility=["read", "create", "update", "delete", "query"] + ) """successful importInfoList.""" @overload @@ -3199,13 +3679,13 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class BusinessMetadataOptions(_model_base.Model): """Business metadata to send to the service. - All required parameters must be populated in order to send to server. - :ivar file: InputStream of file. Required. :vartype file: ~azure.purview.datamap._vendor.FileType """ - file: FileType = rest_field(is_multipart_file_input=True) + file: FileType = rest_field( + visibility=["read", "create", "update", "delete", "query"], is_multipart_file_input=True + ) """InputStream of file. Required.""" @overload @@ -3236,10 +3716,14 @@ class ClassificationAssociateOptions(_model_base.Model): :vartype entity_guids: list[str] """ - classification: Optional["_models.AtlasClassification"] = rest_field() + classification: Optional["_models.AtlasClassification"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An instance of a classification; it doesn't have an identity, this object exists only when associated with an entity.""" - entity_guids: Optional[List[str]] = rest_field(name="entityGuids") + entity_guids: Optional[List[str]] = rest_field( + name="entityGuids", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of the entity.""" @overload @@ -3270,9 +3754,9 @@ class ContactInfo(_model_base.Model): :vartype info: str """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Azure Active Directory object Id.""" - info: Optional[str] = rest_field() + info: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """additional information to describe this contact.""" @overload @@ -3306,11 +3790,13 @@ class ContactSearchResultValue(_model_base.Model): :vartype contact_type: str """ - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the contact.""" - info: Optional[str] = rest_field() + info: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the contact.""" - contact_type: Optional[str] = rest_field(name="contactType") + contact_type: Optional[str] = rest_field( + name="contactType", visibility=["read", "create", "update", "delete", "query"] + ) """The type of the contact. It can be Expert or Owner for an entity. It can be Expert or Steward for a glossary term.""" @@ -3357,23 +3843,35 @@ class DateFormat(_model_base.Model): :vartype time_zone: ~azure.purview.datamap.models.TimeZone """ - available_locales: Optional[List[str]] = rest_field(name="availableLocales") + available_locales: Optional[List[str]] = rest_field( + name="availableLocales", visibility=["read", "create", "update", "delete", "query"] + ) """An array of available locales.""" - calendar: Optional[float] = rest_field() + calendar: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Calendar.""" - date_instance: Optional["_models.DateFormat"] = rest_field(name="dateInstance") + date_instance: Optional["_models.DateFormat"] = rest_field( + name="dateInstance", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - date_time_instance: Optional["_models.DateFormat"] = rest_field(name="dateTimeInstance") + date_time_instance: Optional["_models.DateFormat"] = rest_field( + name="dateTimeInstance", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - instance: Optional["_models.DateFormat"] = rest_field() + instance: Optional["_models.DateFormat"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The date format.""" - lenient: Optional[bool] = rest_field() + lenient: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Determines the leniency of the date format.""" - number_format: Optional["_models.NumberFormat"] = rest_field(name="numberFormat") + number_format: Optional["_models.NumberFormat"] = rest_field( + name="numberFormat", visibility=["read", "create", "update", "delete", "query"] + ) """The number format.""" - time_instance: Optional["_models.DateFormat"] = rest_field(name="timeInstance") + time_instance: Optional["_models.DateFormat"] = rest_field( + name="timeInstance", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - time_zone: Optional["_models.TimeZone"] = rest_field(name="timeZone") + time_zone: Optional["_models.TimeZone"] = rest_field( + name="timeZone", visibility=["read", "create", "update", "delete", "query"] + ) """The timezone information.""" @overload @@ -3413,11 +3911,17 @@ class EntityMutationResult(_model_base.Model): :vartype partial_updated_entities: list[~azure.purview.datamap.models.AtlasEntityHeader] """ - guid_assignments: Optional[Dict[str, str]] = rest_field(name="guidAssignments") + guid_assignments: Optional[Dict[str, str]] = rest_field( + name="guidAssignments", visibility=["read", "create", "update", "delete", "query"] + ) """A map of GUID assignments with entities.""" - mutated_entities: Optional[Dict[str, List["_models.AtlasEntityHeader"]]] = rest_field(name="mutatedEntities") + mutated_entities: Optional[Dict[str, List["_models.AtlasEntityHeader"]]] = rest_field( + name="mutatedEntities", visibility=["read", "create", "update", "delete", "query"] + ) """The entity headers of mutated entities.""" - partial_updated_entities: Optional[List["_models.AtlasEntityHeader"]] = rest_field(name="partialUpdatedEntities") + partial_updated_entities: Optional[List["_models.AtlasEntityHeader"]] = rest_field( + name="partialUpdatedEntities", visibility=["read", "create", "update", "delete", "query"] + ) """An array of entity headers that partially updated.""" @overload @@ -3453,13 +3957,19 @@ class ImportInfo(_model_base.Model): :vartype remarks: str """ - child_object_name: Optional[str] = rest_field(name="childObjectName") + child_object_name: Optional[str] = rest_field( + name="childObjectName", visibility=["read", "create", "update", "delete", "query"] + ) """childObjectName.""" - import_status: Optional[Union[str, "_models.ImportStatus"]] = rest_field(name="importStatus") + import_status: Optional[Union[str, "_models.ImportStatus"]] = rest_field( + name="importStatus", visibility=["read", "create", "update", "delete", "query"] + ) """importStatus. Known values are: \"SUCCESS\" and \"FAILED\".""" - parent_object_name: Optional[str] = rest_field(name="parentObjectName") + parent_object_name: Optional[str] = rest_field( + name="parentObjectName", visibility=["read", "create", "update", "delete", "query"] + ) """parentObjectName.""" - remarks: Optional[str] = rest_field() + remarks: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """remarks.""" @overload @@ -3494,11 +4004,17 @@ class LineageRelation(_model_base.Model): :vartype to_entity_id: str """ - from_entity_id: Optional[str] = rest_field(name="fromEntityId") + from_entity_id: Optional[str] = rest_field( + name="fromEntityId", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of from-entity.""" - relationship_id: Optional[str] = rest_field(name="relationshipId") + relationship_id: Optional[str] = rest_field( + name="relationshipId", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of relationship.""" - to_entity_id: Optional[str] = rest_field(name="toEntityId") + to_entity_id: Optional[str] = rest_field( + name="toEntityId", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of to-entity.""" @overload @@ -3528,7 +4044,9 @@ class MoveEntitiesOptions(_model_base.Model): :vartype entity_guids: list[str] """ - entity_guids: Optional[List[str]] = rest_field(name="entityGuids") + entity_guids: Optional[List[str]] = rest_field( + name="entityGuids", visibility=["read", "create", "update", "delete", "query"] + ) """An array of entity guids to be moved to target collection.""" @overload @@ -3583,33 +4101,57 @@ class NumberFormat(_model_base.Model): :vartype rounding_mode: str or ~azure.purview.datamap.models.RoundingMode """ - available_locales: Optional[List[str]] = rest_field(name="availableLocales") + available_locales: Optional[List[str]] = rest_field( + name="availableLocales", visibility=["read", "create", "update", "delete", "query"] + ) """The number format.""" - currency: Optional[str] = rest_field() + currency: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The currency.""" - currency_instance: Optional["_models.NumberFormat"] = rest_field(name="currencyInstance") + currency_instance: Optional["_models.NumberFormat"] = rest_field( + name="currencyInstance", visibility=["read", "create", "update", "delete", "query"] + ) """The number format.""" - grouping_used: Optional[bool] = rest_field(name="groupingUsed") + grouping_used: Optional[bool] = rest_field( + name="groupingUsed", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if grouping is used.""" - instance: Optional["_models.NumberFormat"] = rest_field() + instance: Optional["_models.NumberFormat"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The number format.""" - integer_instance: Optional["_models.NumberFormat"] = rest_field(name="integerInstance") + integer_instance: Optional["_models.NumberFormat"] = rest_field( + name="integerInstance", visibility=["read", "create", "update", "delete", "query"] + ) """The number format.""" - maximum_fraction_digits: Optional[int] = rest_field(name="maximumFractionDigits") + maximum_fraction_digits: Optional[int] = rest_field( + name="maximumFractionDigits", visibility=["read", "create", "update", "delete", "query"] + ) """The maximum of fraction digits.""" - maximum_integer_digits: Optional[int] = rest_field(name="maximumIntegerDigits") + maximum_integer_digits: Optional[int] = rest_field( + name="maximumIntegerDigits", visibility=["read", "create", "update", "delete", "query"] + ) """The maximum of integer digits.""" - minimum_fraction_digits: Optional[int] = rest_field(name="minimumFractionDigits") + minimum_fraction_digits: Optional[int] = rest_field( + name="minimumFractionDigits", visibility=["read", "create", "update", "delete", "query"] + ) """The minimum of fraction digits.""" - minimum_integer_digits: Optional[int] = rest_field(name="minimumIntegerDigits") + minimum_integer_digits: Optional[int] = rest_field( + name="minimumIntegerDigits", visibility=["read", "create", "update", "delete", "query"] + ) """The minimum of integer digits.""" - number_instance: Optional["_models.NumberFormat"] = rest_field(name="numberInstance") + number_instance: Optional["_models.NumberFormat"] = rest_field( + name="numberInstance", visibility=["read", "create", "update", "delete", "query"] + ) """The number format.""" - parse_integer_only: Optional[bool] = rest_field(name="parseIntegerOnly") + parse_integer_only: Optional[bool] = rest_field( + name="parseIntegerOnly", visibility=["read", "create", "update", "delete", "query"] + ) """Determines if only integer is parsed.""" - percent_instance: Optional["_models.NumberFormat"] = rest_field(name="percentInstance") + percent_instance: Optional["_models.NumberFormat"] = rest_field( + name="percentInstance", visibility=["read", "create", "update", "delete", "query"] + ) """The number format.""" - rounding_mode: Optional[Union[str, "_models.RoundingMode"]] = rest_field(name="roundingMode") + rounding_mode: Optional[Union[str, "_models.RoundingMode"]] = rest_field( + name="roundingMode", visibility=["read", "create", "update", "delete", "query"] + ) """The enum of rounding mode. Known values are: \"UP\", \"DOWN\", \"CEILING\", \"FLOOR\", \"HALF_UP\", \"HALF_DOWN\", \"HALF_EVEN\", and \"UNNECESSARY\".""" @@ -3655,11 +4197,17 @@ class ParentRelation(_model_base.Model): :vartype parent_entity_id: str """ - child_entity_id: Optional[str] = rest_field(name="childEntityId") + child_entity_id: Optional[str] = rest_field( + name="childEntityId", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of child entity.""" - relationship_id: Optional[str] = rest_field(name="relationshipId") + relationship_id: Optional[str] = rest_field( + name="relationshipId", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of relationship.""" - parent_entity_id: Optional[str] = rest_field(name="parentEntityId") + parent_entity_id: Optional[str] = rest_field( + name="parentEntityId", visibility=["read", "create", "update", "delete", "query"] + ) """The GUID of parent entity.""" @overload @@ -3699,26 +4247,32 @@ class PurviewObjectId(_model_base.Model): :vartype item_path: str :ivar resource_id: Resource Id. :vartype resource_id: str - :ivar properties: Dictionary of :code:``. + :ivar properties: Dictionary of . :vartype properties: dict[str, any] """ - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the object.""" - type_name: Optional[str] = rest_field(name="typeName") + type_name: Optional[str] = rest_field(name="typeName", visibility=["read", "create", "update", "delete", "query"]) """The name of the type.""" - unique_attributes: Optional[Dict[str, Any]] = rest_field(name="uniqueAttributes") + unique_attributes: Optional[Dict[str, Any]] = rest_field( + name="uniqueAttributes", visibility=["read", "create", "update", "delete", "query"] + ) """The unique attributes of the object.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Name.""" - display_text: Optional[str] = rest_field(name="displayText") + display_text: Optional[str] = rest_field( + name="displayText", visibility=["read", "create", "update", "delete", "query"] + ) """Display text.""" - item_path: Optional[str] = rest_field(name="itemPath") + item_path: Optional[str] = rest_field(name="itemPath", visibility=["read", "create", "update", "delete", "query"]) """Item path.""" - resource_id: Optional[str] = rest_field(name="resourceId") + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) """Resource Id.""" - properties: Optional[Dict[str, Any]] = rest_field() - """Dictionary of :code:``.""" + properties: Optional[Dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Dictionary of .""" @overload def __init__( @@ -3767,21 +4321,27 @@ class QueryOptions(_model_base.Model): :vartype taxonomy_setting: ~azure.purview.datamap.models.SearchTaxonomySetting """ - keywords: Optional[str] = rest_field() + keywords: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The keywords applied to all searchable fields.""" - limit: Optional[int] = rest_field() + limit: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The limit of the number of the search result. default value is 50; maximum value is 1000.""" - continuation_token: Optional[str] = rest_field(name="continuationToken") + continuation_token: Optional[str] = rest_field( + name="continuationToken", visibility=["read", "create", "update", "delete", "query"] + ) """The token used to get next batch of data. Default 'Null' to get the first batch, and will return new token in each response unless there's no more data.""" - orderby: Optional[List[Any]] = rest_field() + orderby: Optional[List[Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The sort order of search results, can specify multiple fields.""" - filter: Optional[Any] = rest_field() + filter: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The filter for the search. See examples for the usage of supported filters.""" - facets: Optional[List["_models.SearchFacetItem"]] = rest_field() + facets: Optional[List["_models.SearchFacetItem"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The facets for search. See examples for the usage of supported facets.""" - taxonomy_setting: Optional["_models.SearchTaxonomySetting"] = rest_field(name="taxonomySetting") + taxonomy_setting: Optional["_models.SearchTaxonomySetting"] = rest_field( + name="taxonomySetting", visibility=["read", "create", "update", "delete", "query"] + ) """The taxonomy setting for search.""" @overload @@ -3828,18 +4388,28 @@ class QueryResult(_model_base.Model): :vartype value: list[~azure.purview.datamap.models.SearchResultValue] """ - search_count: Optional[int] = rest_field(name="@search.count") + search_count: Optional[int] = rest_field( + name="@search.count", visibility=["read", "create", "update", "delete", "query"] + ) """The total number of search results (not the number of documents in a single page).""" - search_count_approximate: Optional[bool] = rest_field(name="@search.count.approximate") + search_count_approximate: Optional[bool] = rest_field( + name="@search.count.approximate", visibility=["read", "create", "update", "delete", "query"] + ) """'True' if the '@search.count' is an approximate value and vise versa.""" - continuation_token: Optional[str] = rest_field(name="continuationToken") + continuation_token: Optional[str] = rest_field( + name="continuationToken", visibility=["read", "create", "update", "delete", "query"] + ) """The token used to get next batch of data. Absent if there's no more data.""" - search_facets: Optional["_models.SearchFacetResultValue"] = rest_field(name="@search.facets") + search_facets: Optional["_models.SearchFacetResultValue"] = rest_field( + name="@search.facets", visibility=["read", "create", "update", "delete", "query"] + ) """A facet list that consists of index fields assetType ,classification, contactId, and label. When the facet is specified in the request, the value of the facet is returned as an element of @search.facets.""" - value: Optional[List["_models.SearchResultValue"]] = rest_field() + value: Optional[List["_models.SearchResultValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Search result value.""" @overload @@ -3873,9 +4443,11 @@ class ResourceLink(_model_base.Model): :vartype url: str """ - display_name: Optional[str] = rest_field(name="displayName") + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) """Display name for url.""" - url: Optional[str] = rest_field() + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """web url. http or https.""" @overload @@ -3908,11 +4480,11 @@ class SearchFacetItem(_model_base.Model): :vartype sort: ~azure.purview.datamap.models.SearchFacetSort """ - count: Optional[int] = rest_field() + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The count of the facet item.""" - facet: Optional[str] = rest_field() + facet: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the facet item.""" - sort: Optional["_models.SearchFacetSort"] = rest_field() + sort: Optional["_models.SearchFacetSort"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Define the sorting criteria for items.""" @overload @@ -3944,9 +4516,9 @@ class SearchFacetItemValue(_model_base.Model): :vartype value: str """ - count: Optional[int] = rest_field() + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The count of the facet item.""" - value: Optional[str] = rest_field() + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the facet item.""" @overload @@ -3995,25 +4567,45 @@ class SearchFacetResultValue(_model_base.Model): :vartype term_template: list[~azure.purview.datamap.models.SearchFacetItemValue] """ - entity_type: Optional[List["_models.SearchFacetItemValue"]] = rest_field(name="entityType") + entity_type: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + name="entityType", visibility=["read", "create", "update", "delete", "query"] + ) """Entity type.""" - asset_type: Optional[List["_models.SearchFacetItemValue"]] = rest_field(name="assetType") + asset_type: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + name="assetType", visibility=["read", "create", "update", "delete", "query"] + ) """Asset type.""" - classification: Optional[List["_models.SearchFacetItemValue"]] = rest_field() + classification: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Classification.""" - term: Optional[List["_models.SearchFacetItemValue"]] = rest_field() + term: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Term.""" - contact_id: Optional[List["_models.SearchFacetItemValue"]] = rest_field(name="contactId") + contact_id: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + name="contactId", visibility=["read", "create", "update", "delete", "query"] + ) """Contact id.""" - contact_type: Optional[List["_models.SearchFacetItemValue"]] = rest_field(name="contactType") + contact_type: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + name="contactType", visibility=["read", "create", "update", "delete", "query"] + ) """Contact type.""" - label: Optional[List["_models.SearchFacetItemValue"]] = rest_field() + label: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Label.""" - glossary_type: Optional[List["_models.SearchFacetItemValue"]] = rest_field(name="glossaryType") + glossary_type: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + name="glossaryType", visibility=["read", "create", "update", "delete", "query"] + ) """Glossary type.""" - term_status: Optional[List["_models.SearchFacetItemValue"]] = rest_field(name="termStatus") + term_status: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + name="termStatus", visibility=["read", "create", "update", "delete", "query"] + ) """Term status.""" - term_template: Optional[List["_models.SearchFacetItemValue"]] = rest_field(name="termTemplate") + term_template: Optional[List["_models.SearchFacetItemValue"]] = rest_field( + name="termTemplate", visibility=["read", "create", "update", "delete", "query"] + ) """Term template.""" @overload @@ -4052,9 +4644,13 @@ class SearchFacetSort(_model_base.Model): :vartype value: str or ~azure.purview.datamap.models.SearchSortOrder """ - count: Optional[Union[str, "_models.SearchSortOrder"]] = rest_field() + count: Optional[Union[str, "_models.SearchSortOrder"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Order by count. Known values are: \"asc\" and \"desc\".""" - value: Optional[Union[str, "_models.SearchSortOrder"]] = rest_field() + value: Optional[Union[str, "_models.SearchSortOrder"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Order by value. Known values are: \"asc\" and \"desc\".""" @overload @@ -4094,15 +4690,19 @@ class SearchHighlights(_model_base.Model): :vartype entity_type: list[str] """ - id: Optional[List[str]] = rest_field() + id: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Id.""" - qualified_name: Optional[List[str]] = rest_field(name="qualifiedName") + qualified_name: Optional[List[str]] = rest_field( + name="qualifiedName", visibility=["read", "create", "update", "delete", "query"] + ) """Qualified name.""" - name: Optional[List[str]] = rest_field() + name: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Name.""" - description: Optional[List[str]] = rest_field() + description: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Description.""" - entity_type: Optional[List[str]] = rest_field(name="entityType") + entity_type: Optional[List[str]] = rest_field( + name="entityType", visibility=["read", "create", "update", "delete", "query"] + ) """Entity type.""" @overload @@ -4158,7 +4758,7 @@ class SearchResultValue(_model_base.Model): :ivar description: The description of the asset. :vartype description: str :ivar endorsement: The endorsement of the asset. - :vartype endorsement: str + :vartype endorsement: list[str] :ivar owner: The owner of the record. :vartype owner: str :ivar classification: The classifications of the record. @@ -4184,55 +4784,83 @@ class SearchResultValue(_model_base.Model): :vartype long_description: str """ - search_score: Optional[float] = rest_field(name="@search.score") + search_score: Optional[float] = rest_field( + name="@search.score", visibility=["read", "create", "update", "delete", "query"] + ) """The search score calculated by the search engine. The results are ordered by search score by default.""" - search_highlights: Optional["_models.SearchHighlights"] = rest_field(name="@search.highlights") + search_highlights: Optional["_models.SearchHighlights"] = rest_field( + name="@search.highlights", visibility=["read", "create", "update", "delete", "query"] + ) """A highlight list that consists of index fields id ,qualifiedName, name, description, entityType. When the keyword appears in those fields, the value of the field, attached with emphasis mark, is returned as an element of @search.highlights.""" - object_type: Optional[str] = rest_field(name="objectType") + object_type: Optional[str] = rest_field( + name="objectType", visibility=["read", "create", "update", "delete", "query"] + ) """The object type of the record. Object type is the top-level property to distinguish whether a record is an asset or a term.""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The create time of the record. The Unix epoch format.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The last update time of the record. The Unix epoch format.""" - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the record.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the record.""" - qualified_name: Optional[str] = rest_field(name="qualifiedName") + qualified_name: Optional[str] = rest_field( + name="qualifiedName", visibility=["read", "create", "update", "delete", "query"] + ) """The qualified name of the record.""" - entity_type: Optional[str] = rest_field(name="entityType") + entity_type: Optional[str] = rest_field( + name="entityType", visibility=["read", "create", "update", "delete", "query"] + ) """The type name of the asset.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the asset.""" - endorsement: Optional[str] = rest_field() + endorsement: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The endorsement of the asset.""" - owner: Optional[str] = rest_field() + owner: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The owner of the record.""" - classification: Optional[List[str]] = rest_field() + classification: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The classifications of the record.""" - label: Optional[List[str]] = rest_field() + label: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The labels of the asset.""" - term: Optional[List["_models.TermSearchResultValue"]] = rest_field() + term: Optional[List["_models.TermSearchResultValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The terms assigned to the asset.""" - contact: Optional[List["_models.ContactSearchResultValue"]] = rest_field() + contact: Optional[List["_models.ContactSearchResultValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The contacts of the asset.""" - asset_type: Optional[List[str]] = rest_field(name="assetType") + asset_type: Optional[List[str]] = rest_field( + name="assetType", visibility=["read", "create", "update", "delete", "query"] + ) """The asset types of the asset.""" - glossary_type: Optional[str] = rest_field(name="glossaryType") + glossary_type: Optional[str] = rest_field( + name="glossaryType", visibility=["read", "create", "update", "delete", "query"] + ) """The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or AtlasGlossaryCategory.""" - glossary: Optional[str] = rest_field() + glossary: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The glossary name of the term.""" - term_status: Optional[str] = rest_field(name="termStatus") + term_status: Optional[str] = rest_field( + name="termStatus", visibility=["read", "create", "update", "delete", "query"] + ) """The status of the term.""" - term_template: Optional[List[str]] = rest_field(name="termTemplate") + term_template: Optional[List[str]] = rest_field( + name="termTemplate", visibility=["read", "create", "update", "delete", "query"] + ) """The term template names used by the term.""" - long_description: Optional[str] = rest_field(name="longDescription") + long_description: Optional[str] = rest_field( + name="longDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The definition of the term.""" @overload @@ -4249,7 +4877,7 @@ def __init__( qualified_name: Optional[str] = None, entity_type: Optional[str] = None, description: Optional[str] = None, - endorsement: Optional[str] = None, + endorsement: Optional[List[str]] = None, owner: Optional[str] = None, classification: Optional[List[str]] = None, label: Optional[List[str]] = None, @@ -4283,9 +4911,11 @@ class SearchTaxonomySetting(_model_base.Model): :vartype facet: ~azure.purview.datamap.models.SearchFacetItem """ - asset_types: Optional[List[str]] = rest_field(name="assetTypes") + asset_types: Optional[List[str]] = rest_field( + name="assetTypes", visibility=["read", "create", "update", "delete", "query"] + ) """Asset types.""" - facet: Optional["_models.SearchFacetItem"] = rest_field() + facet: Optional["_models.SearchFacetItem"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The content of a search facet result item.""" @overload @@ -4322,15 +4952,15 @@ class SuggestOptions(_model_base.Model): :vartype filter: any """ - keywords: Optional[str] = rest_field() + keywords: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The keywords applied to all fields that support suggest operation. It must be at least 1 character, and no more than 100 characters. In the index schema we defined a default suggester which lists all the supported fields and specifies a search mode.""" - limit: Optional[int] = rest_field() + limit: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The number of suggestions we hope to return. The default value is 5. The value must be a number between 1 and 100.""" - filter: Optional[Any] = rest_field() + filter: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The filter for the search.""" @overload @@ -4360,7 +4990,9 @@ class SuggestResult(_model_base.Model): :vartype value: list[~azure.purview.datamap.models.SuggestResultValue] """ - value: Optional[List["_models.SuggestResultValue"]] = rest_field() + value: Optional[List["_models.SuggestResultValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The result value.""" @overload @@ -4409,7 +5041,7 @@ class SuggestResultValue(_model_base.Model): :ivar description: The description of the asset. :vartype description: str :ivar endorsement: The endorsement of the asset. - :vartype endorsement: str + :vartype endorsement: list[str] :ivar owner: The owner of the record. :vartype owner: str :ivar classification: The classifications of the record. @@ -4435,53 +5067,81 @@ class SuggestResultValue(_model_base.Model): :vartype long_description: str """ - search_score: Optional[float] = rest_field(name="@search.score") + search_score: Optional[float] = rest_field( + name="@search.score", visibility=["read", "create", "update", "delete", "query"] + ) """The search score calculated by the search engine. The results are ordered by search score by default.""" - search_text: Optional[str] = rest_field(name="@search.text") + search_text: Optional[str] = rest_field( + name="@search.text", visibility=["read", "create", "update", "delete", "query"] + ) """The target text that contains the keyword as prefix. The keyword is wrapped with emphasis mark.""" - object_type: Optional[str] = rest_field(name="objectType") + object_type: Optional[str] = rest_field( + name="objectType", visibility=["read", "create", "update", "delete", "query"] + ) """The object type of the record. Object type is the top-level property to distinguish whether a record is an asset or a term.""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The create time of the record. The Unix epoch format.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The last update time of the record. The Unix epoch format.""" - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the record.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the record.""" - qualified_name: Optional[str] = rest_field(name="qualifiedName") + qualified_name: Optional[str] = rest_field( + name="qualifiedName", visibility=["read", "create", "update", "delete", "query"] + ) """The qualified name of the record.""" - entity_type: Optional[str] = rest_field(name="entityType") + entity_type: Optional[str] = rest_field( + name="entityType", visibility=["read", "create", "update", "delete", "query"] + ) """The type name of the asset.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the asset.""" - endorsement: Optional[str] = rest_field() + endorsement: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The endorsement of the asset.""" - owner: Optional[str] = rest_field() + owner: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The owner of the record.""" - classification: Optional[List[str]] = rest_field() + classification: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The classifications of the record.""" - label: Optional[List[str]] = rest_field() + label: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The labels of the asset.""" - term: Optional[List["_models.TermSearchResultValue"]] = rest_field() + term: Optional[List["_models.TermSearchResultValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The terms assigned to the asset.""" - contact: Optional[List["_models.ContactSearchResultValue"]] = rest_field() + contact: Optional[List["_models.ContactSearchResultValue"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The contacts of the asset.""" - asset_type: Optional[List[str]] = rest_field(name="assetType") + asset_type: Optional[List[str]] = rest_field( + name="assetType", visibility=["read", "create", "update", "delete", "query"] + ) """The asset types of the asset.""" - glossary_type: Optional[str] = rest_field(name="glossaryType") + glossary_type: Optional[str] = rest_field( + name="glossaryType", visibility=["read", "create", "update", "delete", "query"] + ) """The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or AtlasGlossaryCategory.""" - glossary: Optional[str] = rest_field() + glossary: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The glossary name of the term.""" - term_status: Optional[str] = rest_field(name="termStatus") + term_status: Optional[str] = rest_field( + name="termStatus", visibility=["read", "create", "update", "delete", "query"] + ) """The status of the term.""" - term_template: Optional[List[str]] = rest_field(name="termTemplate") + term_template: Optional[List[str]] = rest_field( + name="termTemplate", visibility=["read", "create", "update", "delete", "query"] + ) """The term template names used by the term.""" - long_description: Optional[str] = rest_field(name="longDescription") + long_description: Optional[str] = rest_field( + name="longDescription", visibility=["read", "create", "update", "delete", "query"] + ) """The definition of the term.""" @overload @@ -4498,7 +5158,7 @@ def __init__( qualified_name: Optional[str] = None, entity_type: Optional[str] = None, description: Optional[str] = None, - endorsement: Optional[str] = None, + endorsement: Optional[List[str]] = None, owner: Optional[str] = None, classification: Optional[List[str]] = None, label: Optional[List[str]] = None, @@ -4534,11 +5194,13 @@ class TermSearchResultValue(_model_base.Model): :vartype guid: str """ - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the term.""" - glossary_name: Optional[str] = rest_field(name="glossaryName") + glossary_name: Optional[str] = rest_field( + name="glossaryName", visibility=["read", "create", "update", "delete", "query"] + ) """The name of the glossary which contains the term.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the term.""" @overload @@ -4598,37 +5260,53 @@ class TermTemplateDef(_model_base.Model): :vartype attribute_defs: list[~azure.purview.datamap.models.AtlasAttributeDef] """ - category: Optional[Union[str, "_models.TypeCategory"]] = rest_field() + category: Optional[Union[str, "_models.TypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The enum of type category. Known values are: \"PRIMITIVE\", \"OBJECT_ID_TYPE\", \"ENUM\", \"STRUCT\", \"CLASSIFICATION\", \"ENTITY\", \"ARRAY\", \"MAP\", \"RELATIONSHIP\", and \"TERM_TEMPLATE\".""" - create_time: Optional[int] = rest_field(name="createTime") + create_time: Optional[int] = rest_field( + name="createTime", visibility=["read", "create", "update", "delete", "query"] + ) """The created time of the record.""" - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The user who created the record.""" - date_formatter: Optional["_models.DateFormat"] = rest_field(name="dateFormatter") + date_formatter: Optional["_models.DateFormat"] = rest_field( + name="dateFormatter", visibility=["read", "create", "update", "delete", "query"] + ) """The date format.""" - description: Optional[str] = rest_field() + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the type definition.""" - guid: Optional[str] = rest_field() + guid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The GUID of the type definition.""" - name: Optional[str] = rest_field() + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the type definition.""" - options: Optional[Dict[str, str]] = rest_field() + options: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The options for the type definition.""" - service_type: Optional[str] = rest_field(name="serviceType") + service_type: Optional[str] = rest_field( + name="serviceType", visibility=["read", "create", "update", "delete", "query"] + ) """The service type.""" - type_version: Optional[str] = rest_field(name="typeVersion") + type_version: Optional[str] = rest_field( + name="typeVersion", visibility=["read", "create", "update", "delete", "query"] + ) """The version of the type.""" - update_time: Optional[int] = rest_field(name="updateTime") + update_time: Optional[int] = rest_field( + name="updateTime", visibility=["read", "create", "update", "delete", "query"] + ) """The update time of the record.""" - updated_by: Optional[str] = rest_field(name="updatedBy") + updated_by: Optional[str] = rest_field(name="updatedBy", visibility=["read", "create", "update", "delete", "query"]) """The user who updated the record.""" - version: Optional[int] = rest_field() + version: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The version of the record.""" - last_modified_ts: Optional[str] = rest_field(name="lastModifiedTS") + last_modified_ts: Optional[str] = rest_field( + name="lastModifiedTS", visibility=["read", "create", "update", "delete", "query"] + ) """ETag for concurrency control.""" - attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field(name="attributeDefs") + attribute_defs: Optional[List["_models.AtlasAttributeDef"]] = rest_field( + name="attributeDefs", visibility=["read", "create", "update", "delete", "query"] + ) """An array of attribute definitions.""" @overload @@ -4674,11 +5352,11 @@ class TimeBoundary(_model_base.Model): :vartype time_zone: str """ - end_time: Optional[str] = rest_field(name="endTime") + end_time: Optional[str] = rest_field(name="endTime", visibility=["read", "create", "update", "delete", "query"]) """The end of the time boundary.""" - start_time: Optional[str] = rest_field(name="startTime") + start_time: Optional[str] = rest_field(name="startTime", visibility=["read", "create", "update", "delete", "query"]) """The start of the time boundary.""" - time_zone: Optional[str] = rest_field(name="timeZone") + time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) """The timezone of the time boundary.""" @overload @@ -4718,17 +5396,23 @@ class TimeZone(_model_base.Model): :vartype raw_offset: int """ - dst_savings: Optional[int] = rest_field(name="dstSavings") + dst_savings: Optional[int] = rest_field( + name="dstSavings", visibility=["read", "create", "update", "delete", "query"] + ) """The value of the daylight saving time.""" - id: Optional[str] = rest_field() + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The ID of the timezone.""" - available_ids: Optional[List[str]] = rest_field(name="availableIds") + available_ids: Optional[List[str]] = rest_field( + name="availableIds", visibility=["read", "create", "update", "delete", "query"] + ) """An array of available IDs.""" - default: Optional["_models.TimeZone"] = rest_field() + default: Optional["_models.TimeZone"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The timezone information.""" - display_name: Optional[str] = rest_field(name="displayName") + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) """The display name of the timezone.""" - raw_offset: Optional[int] = rest_field(name="rawOffset") + raw_offset: Optional[int] = rest_field(name="rawOffset", visibility=["read", "create", "update", "delete", "query"]) """The raw offset of the timezone.""" @overload diff --git a/sdk/purview/azure-purview-datamap/azure/purview/datamap/operations/_operations.py b/sdk/purview/azure-purview-datamap/azure/purview/datamap/operations/_operations.py index 9072f93195af..21e502211cfd 100644 --- a/sdk/purview/azure-purview-datamap/azure/purview/datamap/operations/_operations.py +++ b/sdk/purview/azure-purview-datamap/azure/purview/datamap/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -2444,7 +2444,7 @@ def create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of - collections are not well supported. E.g., array`>, array>, array>. For each contact type, the maximum number of contacts is 20. @@ -2481,7 +2481,7 @@ def create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of - collections are not well supported. E.g., array`>, array>, array>. For each contact type, the maximum number of contacts is 20. @@ -2518,7 +2518,7 @@ def create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of - collections are not well supported. E.g., array`>, array>, array>. For each contact type, the maximum number of contacts is 20. @@ -2554,7 +2554,7 @@ def create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of - collections are not well supported. E.g., array`>, array>, array>. For each contact type, the maximum number of contacts is 20. @@ -2727,7 +2727,7 @@ def batch_create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array - of collections are not well supported. E.g., array`>, + of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20. @@ -2765,7 +2765,7 @@ def batch_create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array - of collections are not well supported. E.g., array`>, + of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20. @@ -2803,7 +2803,7 @@ def batch_create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array - of collections are not well supported. E.g., array`>, + of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20. @@ -2840,7 +2840,7 @@ def batch_create_or_update( Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array - of collections are not well supported. E.g., array`>, + of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20. @@ -3696,7 +3696,7 @@ def get_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\\\ :code:``=\\ :code:``. + attr:\\=. NOTE: The attrName and attrValue should be unique across entities, eg. @@ -3793,7 +3793,7 @@ def update_by_unique_attribute( typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -3836,7 +3836,7 @@ def update_by_unique_attribute( typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -3879,7 +3879,7 @@ def update_by_unique_attribute( typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -3921,7 +3921,7 @@ def update_by_unique_attribute( typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -4012,7 +4012,7 @@ def delete_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\\\ :code:``=\\\\ :code:``. + attr:\\=\\. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -4535,9 +4535,7 @@ def batch_get_by_unique_attributes( provided in the following format - typeName=\\\\ :code:``&attr_1:\\\\ :code:``=\\\\ - :code:``&attr_2:\\\\ :code:``=\\\\ :code:``&attr_3:\\\\ - :code:``=\\\\ :code:`` + typeName=\\&attr_1:\\=\\&attr_2:\\=\\&attr_3:\\=\\ NOTE: The attrName should be an unique attribute for the given entity-type. @@ -5616,8 +5614,7 @@ def remove_labels_by_unique_attribute( in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. NOTE: The attrName and attrValue should be - unique + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. @@ -5657,8 +5654,7 @@ def remove_labels_by_unique_attribute( in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. NOTE: The attrName and attrValue should be - unique + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. @@ -5697,8 +5693,7 @@ def remove_labels_by_unique_attribute( # pylint: disable=inconsistent-return-st in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: - attr:\\ :code:``=\\ :code:``. NOTE: The attrName and attrValue should be - unique + attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. @@ -5785,7 +5780,7 @@ def set_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -5827,7 +5822,7 @@ def set_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -5868,7 +5863,7 @@ def set_labels_by_unique_attribute( # pylint: disable=inconsistent-return-state In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -5959,7 +5954,7 @@ def add_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -6001,7 +5996,7 @@ def add_labels_by_unique_attribute( In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. @@ -6042,7 +6037,7 @@ def add_labels_by_unique_attribute( # pylint: disable=inconsistent-return-state In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the - following format: attr:\\ :code:``=\\ :code:``. + following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_auto_complete.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_auto_complete.py new file mode 100644 index 000000000000..a07a4a1e73cc --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_auto_complete.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_auto_complete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.auto_complete( + body={ + "filter": {"and": [{"entityType": "azure_blob_path", "includeSubTypes": False}]}, + "keywords": "exa", + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_AutoComplete.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query.py new file mode 100644 index 000000000000..04d6b45ac382 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "facets": [ + {"count": 0, "facet": "assetType", "sort": {"count": "desc"}}, + {"count": 10, "facet": "classification", "sort": {"count": "desc"}}, + {"count": 10, "facet": "contactId", "sort": {"count": "desc"}}, + {"count": 10, "facet": "label", "sort": {"count": "desc"}}, + {"count": 10, "facet": "term", "sort": {"count": "desc"}}, + ], + "filter": {"and": [{"objectType": "Files"}, {"entityType": "azure_blob_path"}]}, + "keywords": "exampledata", + "limit": 10, + "orderby": [{"name": "ASC"}, {"updateTime": "DESC"}], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_and.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_and.py new file mode 100644 index 000000000000..2bcfc62aaa83 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_and.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_and.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": { + "and": [ + {"entityType": "azure_blob_path"}, + {"attributeName": "qualifiedName", "attributeValue": ".csv", "operator": "contains"}, + ] + }, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_And.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_and_or_nested.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_and_or_nested.py new file mode 100644 index 000000000000..f4b9e083f499 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_and_or_nested.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_and_or_nested.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": { + "and": [ + {"entityType": "azure_blob_path"}, + {"attributeName": "qualifiedName", "attributeValue": ".csv", "operator": "contains"}, + { + "or": [ + {"attributeName": "name", "attributeValue": "exampledata.csv", "operator": "eq"}, + {"attributeName": "qualifiedName", "attributeValue": "https://", "operator": "prefix"}, + ] + }, + ] + }, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_AndOrNested.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_asset_type.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_asset_type.py new file mode 100644 index 000000000000..dc0446db764f --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_asset_type.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_asset_type.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": { + "or": [ + {"assetType": "SQL Server"}, + {"assetType": "Azure SQL Server"}, + {"assetType": "Azure SQL Database"}, + {"assetType": "Azure SQL Data Warehouse"}, + {"assetType": "Azure SQL Managed Instance"}, + {"assetType": "Azure Storage Account"}, + {"assetType": "Azure Blob Storage"}, + {"assetType": "Azure Files"}, + {"assetType": "Azure Table Storage"}, + {"assetType": "Azure Data Lake Storage Gen1"}, + {"assetType": "Azure Data Lake Storage Gen2"}, + {"assetType": "Azure Cosmos DB"}, + {"assetType": "Azure Data Factory"}, + {"assetType": "Azure Cognitive Search"}, + {"assetType": "Power BI"}, + {"assetType": "Azure Data Explorer"}, + {"assetType": "Amazon S3"}, + {"assetType": "Azure Data Share"}, + {"assetType": "Teradata"}, + {"assetType": "SAP S4HANA"}, + {"assetType": "SAP ECC"}, + {"assetType": "SQL Server Integration Services"}, + {"assetType": "hive"}, + {"assetType": "Azure Database for MySQL"}, + {"assetType": "Azure Database for MariaDB"}, + {"assetType": "Azure Database for PostgreSQL"}, + {"assetType": "Azure Synapse Analytics"}, + ] + }, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_AssetType.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_attribute.py new file mode 100644 index 000000000000..bca9fbf7b479 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_attribute.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": { + "or": [ + {"attributeName": "name", "attributeValue": "exampledata.csv", "operator": "eq"}, + {"attributeName": "createTime", "attributeValue": 1545580800000, "operator": "ge"}, + { + "attributeName": "modifiedTime", + "attributeValue": "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D", + "operator": "timerange", + }, + ] + }, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_Attribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_business_metadata_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_business_metadata_attribute.py new file mode 100644 index 000000000000..1eb7fba55941 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_business_metadata_attribute.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_business_metadata_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": { + "or": [ + { + "attributeName": ".", + "attributeValue": "string value", + "operator": "eq|ne|contains|prefix", + }, + { + "attributeName": ".", + "attributeValue": 123, + "operator": "eq|ne|gt|ge|lt|le", + }, + { + "attributeName": ".", + "attributeValue": True, + "operator": "eq|ne", + }, + { + "attributeName": ".", + "attributeValue": "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D", + "operator": "timerange", + }, + ] + }, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_BusinessMetadataAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_classification.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_classification.py new file mode 100644 index 000000000000..4f0f04b2d6ea --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_classification.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_classification.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": {"classification": "MICROSOFT.PERSONAL.EMAIL", "includeSubClassifications": True}, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_Classification.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_collection.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_collection.py new file mode 100644 index 000000000000..6cdf62feb76a --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_collection.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_collection.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={"filter": {"collectionId": "collectionName"}, "keywords": None, "limit": 10}, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_Collection.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_facet.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_facet.py new file mode 100644 index 000000000000..2ca0591dd185 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_facet.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_facet.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "facets": [ + {"count": 10, "facet": "assetType"}, + {"count": 10, "facet": "classification"}, + {"count": 10, "facet": "term"}, + {"count": 10, "facet": "label"}, + ], + "filter": {"objectType": "Tables"}, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_Facet.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_file_extension.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_file_extension.py new file mode 100644 index 000000000000..f164e51948b5 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_file_extension.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_file_extension.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={"filter": {"and": [{"fileExtension": "txt"}]}, "keywords": None, "limit": 10}, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_FileExtension.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_glossary_term.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_glossary_term.py new file mode 100644 index 000000000000..24787653a40a --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_glossary_term.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_glossary_term.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "facets": [ + {"count": 10, "facet": "termStatus", "sort": {"count": "desc"}}, + {"count": 10, "facet": "termTemplate", "sort": {"count": "desc"}}, + ], + "filter": { + "and": [ + {"objectType": "Glossary terms"}, + {"or": [{"glossaryType": "AtlasGlossary"}, {"glossaryType": "AtlasGlossaryTerm"}]}, + ] + }, + "keywords": "", + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_GlossaryTerm.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_id.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_id.py new file mode 100644 index 000000000000..4e4d9a1a9909 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_id.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_id.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={"filter": {"and": [{"id": "bfecbcc3-1838-45fe-96d6-112de8a170f9"}]}, "keywords": None, "limit": 10}, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_Id.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_not.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_not.py new file mode 100644 index 000000000000..9bc11270a4c8 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_not.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_not.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={"filter": {"not": {"classification": "MICROSOFT.SYSTEM.TEMP_FILE"}}, "keywords": None, "limit": 10}, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_Not.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_object_type.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_object_type.py new file mode 100644 index 000000000000..a7fc2ab0fb07 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_object_type.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_object_type.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": { + "or": [ + {"objectType": "Dashboards"}, + {"objectType": "Data pipelines"}, + {"objectType": "Files"}, + {"objectType": "Folders"}, + {"objectType": "Glossary terms"}, + {"objectType": "Reports"}, + {"objectType": "Stored procedures"}, + {"objectType": "Tables"}, + ] + }, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_ObjectType.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_pagination_continuation_page.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_pagination_continuation_page.py new file mode 100644 index 000000000000..4c8daf05c3d8 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_pagination_continuation_page.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_pagination_continuation_page.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "continuationToken": "", + "facets": [ + {"count": 0, "facet": "assetType", "sort": {"count": "desc"}}, + {"count": 10, "facet": "classification", "sort": {"count": "desc"}}, + {"count": 10, "facet": "contactId", "sort": {"count": "desc"}}, + {"count": 10, "facet": "label", "sort": {"count": "desc"}}, + {"count": 10, "facet": "term", "sort": {"count": "desc"}}, + ], + "filter": {"and": [{"objectType": "Files"}, {"entityType": "azure_blob_path"}]}, + "keywords": "exampledata", + "limit": 2, + "orderby": [{"name": "ASC"}, {"updateTime": "DESC"}], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_PaginationContinuationPage.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_pagination_first_page.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_pagination_first_page.py new file mode 100644 index 000000000000..9338e836a1b3 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_pagination_first_page.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_pagination_first_page.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "facets": [ + {"count": 0, "facet": "assetType", "sort": {"count": "desc"}}, + {"count": 10, "facet": "classification", "sort": {"count": "desc"}}, + {"count": 10, "facet": "contactId", "sort": {"count": "desc"}}, + {"count": 10, "facet": "label", "sort": {"count": "desc"}}, + {"count": 10, "facet": "term", "sort": {"count": "desc"}}, + ], + "filter": {"and": [{"objectType": "Files"}, {"entityType": "azure_blob_path"}]}, + "keywords": "exampledata", + "limit": 2, + "orderby": [{"name": "ASC"}, {"updateTime": "DESC"}], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_PaginationFirstPage.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_pagination_last_page.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_pagination_last_page.py new file mode 100644 index 000000000000..12ff4c75d596 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_pagination_last_page.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_pagination_last_page.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "continuationToken": "", + "facets": [ + {"count": 0, "facet": "assetType", "sort": {"count": "desc"}}, + {"count": 10, "facet": "classification", "sort": {"count": "desc"}}, + {"count": 10, "facet": "contactId", "sort": {"count": "desc"}}, + {"count": 10, "facet": "label", "sort": {"count": "desc"}}, + {"count": 10, "facet": "term", "sort": {"count": "desc"}}, + ], + "filter": {"and": [{"objectType": "Files"}, {"entityType": "azure_blob_path"}]}, + "keywords": "exampledata", + "limit": 2, + "orderby": [{"name": "ASC"}, {"updateTime": "DESC"}], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_PaginationLastPage.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_system_time.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_system_time.py new file mode 100644 index 000000000000..a2ca6057cd63 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_system_time.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_system_time.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": { + "or": [ + {"createTime": {"operator": "lt", "timeThreshold": 1545580800000}}, + {"updateTime": "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D"}, + ] + }, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_SystemTime.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_taxonomy.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_taxonomy.py new file mode 100644 index 000000000000..58dfa50093e5 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_taxonomy.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_taxonomy.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": { + "and": [ + {"objectType": "Files"}, + { + "not": { + "or": [ + {"attributeName": "size", "attributeValue": 0, "operator": "eq"}, + {"attributeName": "fileSize", "attributeValue": 0, "operator": "eq"}, + ] + } + }, + {"not": {"classification": "MICROSOFT.SYSTEM.TEMP_FILE"}}, + ] + }, + "keywords": "exampledata", + "limit": 10, + "taxonomySetting": { + "assetTypes": ["Azure Blob Storage"], + "facet": {"count": 10, "sort": {"count": "desc"}}, + }, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_Taxonomy.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_term_assignment.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_term_assignment.py new file mode 100644 index 000000000000..bd1b41b1bb59 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_term_assignment.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_term_assignment.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": { + "or": [ + {"term": "ExampleTerm"}, + {"glossary": "GlossaryName", "term": "ExampleTerm"}, + {"termGuid": ""}, + ] + }, + "keywords": "", + "limit": 3, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_TermAssignment.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_type.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_type.py new file mode 100644 index 000000000000..5a633b9c5a8f --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_query_type.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_query_type.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.query( + body={ + "filter": {"and": [{"entityType": "azure_blob_path", "includeSubTypes": False}]}, + "keywords": None, + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Query_Type.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/discovery_suggest.py b/sdk/purview/azure-purview-datamap/generated_samples/discovery_suggest.py new file mode 100644 index 000000000000..f88a51d7f629 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/discovery_suggest.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python discovery_suggest.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.discovery.suggest( + body={ + "filter": {"and": [{"entityType": "azure_blob_path", "includeSubTypes": False}]}, + "keywords": "exampledata", + "limit": 10, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Discovery_Suggest.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_add_classification_to_entity_by_guids.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_classification_to_entity_by_guids.py new file mode 100644 index 000000000000..88da565b319d --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_classification_to_entity_by_guids.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_add_classification_to_entity_by_guids.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.add_classification( + body={ + "classification": { + "attributes": {}, + "typeName": "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + "validityPeriods": [], + }, + "entityGuids": ["784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa"], + }, + ) + + +# x-ms-original-file: 2023-09-01/Entity_AddClassificationToEntityByGuids.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_add_classifications.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_classifications.py new file mode 100644 index 000000000000..dd3ae6aec34d --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_classifications.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_add_classifications.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.add_classifications( + guid="cc0730ba-9b30-41f0-6953-559d17626d2b", + body=[ + { + "entityGuid": "cc0730ba-9b30-41f0-6953-559d17626d2b", + "typeName": "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + }, + { + "entityGuid": "cc0730ba-9b30-41f0-6953-559d17626d2b", + "typeName": "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + }, + ], + ) + + +# x-ms-original-file: 2023-09-01/Entity_AddClassifications.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_add_classifications_by_unique_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_classifications_by_unique_attribute.py new file mode 100644 index 000000000000..e38fcb24fb4c --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_classifications_by_unique_attribute.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_add_classifications_by_unique_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.add_classifications_by_unique_attribute( + type_name="azure_storage_account", + body=[ + {"typeName": "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"}, + {"typeName": "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER"}, + ], + ) + + +# x-ms-original-file: 2023-09-01/Entity_AddClassificationsByUniqueAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_add_custom_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_custom_attribute.py new file mode 100644 index 000000000000..b9f7b82e96ca --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_custom_attribute.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_add_custom_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.create_or_update( + body={ + "entity": { + "attributes": { + "createTime": 0, + "description": None, + "modifiedTime": 0, + "name": "ExampleStorageAccount", + "owner": "ExampleOwner", + "publicAccessLevel": None, + "qualifiedName": "https://exampleaccount.core.windows.net", + }, + "customAttributes": {"custAttr1": "attr1", "custAttr2": "attr2"}, + "typeName": "azure_storage_account", + }, + "referredEntities": {}, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_AddCustomAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_add_label.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_label.py new file mode 100644 index 000000000000..1a4037e5bc3a --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_label.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_add_label.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.add_label( + guid="02c373fe-2823-4be3-97fa-55180a9faa06", + ) + + +# x-ms-original-file: 2023-09-01/Entity_AddLabel.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_add_labels_by_unique_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_labels_by_unique_attribute.py new file mode 100644 index 000000000000..3ff0c2ff0f51 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_labels_by_unique_attribute.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_add_labels_by_unique_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.add_labels_by_unique_attribute( + type_name="Asset", + ) + + +# x-ms-original-file: 2023-09-01/Entity_AddLabelsByUniqueAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_add_or_update_business_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_or_update_business_attribute.py new file mode 100644 index 000000000000..79890ba8d64e --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_or_update_business_attribute.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_add_or_update_business_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.add_or_update_business_metadata_attributes( + business_metadata_name="myBizMetaData1", + guid="02c373fe-2823-4be3-97fa-55180a9faa06", + body={"bizAttr1": "bizAttr1"}, + ) + + +# x-ms-original-file: 2023-09-01/Entity_AddOrUpdate_BusinessAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_add_or_update_business_metadata.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_or_update_business_metadata.py new file mode 100644 index 000000000000..4f29c43e34a1 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_add_or_update_business_metadata.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_add_or_update_business_metadata.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.add_or_update_business_metadata( + guid="02c373fe-2823-4be3-97fa-55180a9faa06", + body={"myBizMetadata1": {"bizAttr1": "myBizMetaData1.bizAttr1"}}, + ) + + +# x-ms-original-file: 2023-09-01/Entity_AddOrUpdate_BusinessMetadata.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_bulk_create_or_update.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_bulk_create_or_update.py new file mode 100644 index 000000000000..ba2d6e75eca8 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_bulk_create_or_update.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_bulk_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.batch_create_or_update( + body={ + "entities": [ + { + "attributes": { + "createTime": 0, + "description": None, + "modifiedTime": 0, + "name": "ExampleStorageAccount1", + "owner": "ExampleOwner", + "publicAccessLevel": None, + "qualifiedName": "exampleaccount1", + }, + "contacts": { + "Expert": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Expert Info"}], + "Owner": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Owner Info"}], + }, + "createdBy": "ExampleCreator", + "status": "ACTIVE", + "typeName": "azure_storage_account", + "updatedBy": "ExampleUpdator", + "version": 0, + }, + { + "attributes": { + "createTime": 0, + "description": "Example Description", + "modifiedTime": 0, + "name": "ExampleStorageAccount2", + "owner": "ExampleOwner", + "publicAccessLevel": None, + "qualifiedName": "exampleaccount2", + }, + "contacts": { + "Expert": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Expert Info"}], + "Owner": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Owner Info"}], + }, + "createdBy": "ExampleCreator", + "status": "ACTIVE", + "typeName": "azure_storage_account", + "updatedBy": "ExampleUpdator", + "version": 0, + }, + ], + "referredEntities": {}, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_BulkCreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_bulk_delete.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_bulk_delete.py new file mode 100644 index 000000000000..99cd94e33727 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_bulk_delete.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_bulk_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.batch_delete( + guid=["18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b"], + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_BulkDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_bulk_set_classifications.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_bulk_set_classifications.py new file mode 100644 index 000000000000..8b68b1be166e --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_bulk_set_classifications.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_bulk_set_classifications.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.batch_set_classifications( + body={ + "guidHeaderMap": { + "7fcc43ab-55ea-45d4-9971-ce0443cb10bb": { + "attributes": {"qualifiedName": "https://exampleaccount2.core.windows.net"}, + "classifications": [{"typeName": "MICROSOFT.PERSONAL.IPADDRESS"}], + "typeName": "azure_storage_account", + }, + "9fb74c11-ac48-4650-95bc-760665c5bd92": { + "attributes": {"qualifiedName": "https://exampleaccount1.core.windows.net"}, + "classifications": [{"typeName": "MICROSOFT.PERSONAL.EMAIL"}], + "typeName": "azure_storage_account", + }, + } + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_BulkSetClassifications.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_create.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_create.py new file mode 100644 index 000000000000..386649adc81f --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_create.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.create_or_update( + body={ + "entity": { + "attributes": { + "createTime": 0, + "description": None, + "modifiedTime": 0, + "name": "ExampleStorageAccount", + "owner": "ExampleOwner", + "publicAccessLevel": None, + "qualifiedName": "https://exampleaccount.core.windows.net", + }, + "contacts": { + "Expert": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Expert Info"}], + "Owner": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Owner Info"}], + }, + "createdBy": "ExampleCreator", + "status": "ACTIVE", + "typeName": "azure_storage_account", + "updatedBy": "ExampleUpdator", + "version": 0, + }, + "referredEntities": {}, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_Create.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_create_or_update_with_rich_text.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_create_or_update_with_rich_text.py new file mode 100644 index 000000000000..34739ade6d14 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_create_or_update_with_rich_text.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_create_or_update_with_rich_text.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.create_or_update( + body={ + "entity": { + "attributes": { + "createTime": 0, + "description": None, + "modifiedTime": 0, + "name": "ExampleStorageAccount", + "owner": "ExampleOwner", + "publicAccessLevel": None, + "qualifiedName": "https://exampleaccount.core.windows.net", + "userDescription": "
testing
", + }, + "createdBy": "ExampleCreator", + "customAttributes": {"microsoft_isDescriptionRichText": "true"}, + "status": "ACTIVE", + "typeName": "azure_storage_account", + "updatedBy": "ExampleUpdator", + "version": 0, + }, + "referredEntities": {}, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_CreateOrUpdateWithRichText.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_delete.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_delete.py new file mode 100644 index 000000000000..c4443598c9ba --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_delete.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.delete( + guid="fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_delete_by_unique_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_delete_by_unique_attribute.py new file mode 100644 index 000000000000..5b1fd2b86f4b --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_delete_by_unique_attribute.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_delete_by_unique_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.delete_by_unique_attribute( + type_name="azure_storage_account", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_DeleteByUniqueAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_get.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_get.py new file mode 100644 index 000000000000..161ab0c413ea --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_get.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.get( + guid="5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_get_by_unique_attributes.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_by_unique_attributes.py new file mode 100644 index 000000000000..797ac0795aaa --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_by_unique_attributes.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_get_by_unique_attributes.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.get_by_unique_attribute( + type_name="azure_storage_account", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_GetByUniqueAttributes.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_get_classification.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_classification.py new file mode 100644 index 000000000000..a02f3678bb01 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_classification.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_get_classification.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.get_classification( + guid="9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", + classification_name="MICROSOFT.PERSONAL.DATE_OF_BIRTH", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_GetClassification.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_get_classifications.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_classifications.py new file mode 100644 index 000000000000..d808aa99ee3c --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_classifications.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_get_classifications.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.get_classifications( + guid="67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_GetClassifications.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_get_header.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_header.py new file mode 100644 index 000000000000..306fccae3fbb --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_header.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_get_header.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.get_header( + guid="9fb74c11-ac48-4650-95bc-760665c5bd92", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_GetHeader.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_get_sample_business_metadata_template.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_sample_business_metadata_template.py new file mode 100644 index 000000000000..82e3de8cf0d2 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_get_sample_business_metadata_template.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_get_sample_business_metadata_template.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.get_business_metadata_template() + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_GetSampleBusinessMetadataTemplate.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_list_by_guids.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_list_by_guids.py new file mode 100644 index 000000000000..37e35b5e9967 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_list_by_guids.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_list_by_guids.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.get_by_ids( + guid=["784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa"], + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_ListByGuids.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_list_by_unique_attributes.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_list_by_unique_attributes.py new file mode 100644 index 000000000000..ecd324f1e19e --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_list_by_unique_attributes.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_list_by_unique_attributes.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.batch_get_by_unique_attributes( + type_name="azure_storage_account", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_ListByUniqueAttributes.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_move_entities_to_collection.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_move_entities_to_collection.py new file mode 100644 index 000000000000..e00e889b7323 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_move_entities_to_collection.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_move_entities_to_collection.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.move_entities_to_collection( + body={"entityGuids": ["321493e3-3fb7-4b3e-9df7-3b69154174c2", "b2f9c306-cf65-4bb0-878e-cfaafde156b1"]}, + collection_id="ExampleNewCollection", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_MoveEntitiesToCollection.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_partial_update_attribute_by_guid.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_partial_update_attribute_by_guid.py new file mode 100644 index 000000000000..61dc7db201a7 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_partial_update_attribute_by_guid.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_partial_update_attribute_by_guid.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.update_attribute_by_id( + guid="394d9a03-912e-483b-bbd2-bedee1a69798", + body="ExampleNewName", + name="ExampleName", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_PartialUpdateAttributeByGuid.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_partial_update_by_unique_attributes.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_partial_update_by_unique_attributes.py new file mode 100644 index 000000000000..589c90ab49c2 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_partial_update_by_unique_attributes.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_partial_update_by_unique_attributes.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.update_by_unique_attribute( + type_name="azure_storage_account", + body={ + "entity": { + "attributes": { + "createTime": 0, + "name": "ExampleNewName", + "owner": "ExampleOwner", + "qualifiedName": "https://exampleaccount.core.windows.net", + }, + "createTime": 1605766397985, + "createdBy": "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + "guid": "dc507ccf-0c57-4165-9327-f37b0d13fda0", + "lastModifiedTS": "1", + "relationshipAttributes": {"meanings": [], "services": []}, + "status": "ACTIVE", + "typeName": "azure_storage_account", + "updateTime": 1605766397985, + "updatedBy": "8c062c84-5d25-449f-a990-9d8ab70b8ec7", + "version": 0, + }, + "referredEntities": {}, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_PartialUpdateByUniqueAttributes.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_business_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_business_attribute.py new file mode 100644 index 000000000000..974ee4877558 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_business_attribute.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_remove_business_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.remove_business_metadata_attributes( + business_metadata_name="myBizMetaData1", + guid="02c373fe-2823-4be3-97fa-55180a9faa06", + body={"bizAttr1": "bizAttr1"}, + ) + + +# x-ms-original-file: 2023-09-01/Entity_RemoveBusinessAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_business_metadata.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_business_metadata.py new file mode 100644 index 000000000000..bb5b83e62fd8 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_business_metadata.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_remove_business_metadata.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.remove_business_metadata( + guid="02c373fe-2823-4be3-97fa-55180a9faa06", + body={"myBizMetadata1": {"bizAttr1": "myBizMetaData1.bizAttr1"}}, + ) + + +# x-ms-original-file: 2023-09-01/Entity_RemoveBusinessMetadata.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_classification.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_classification.py new file mode 100644 index 000000000000..672ad969fb04 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_classification.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_remove_classification.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.remove_classification( + guid="cc0730ba-9b30-41f0-6953-559d17626d2b", + classification_name="MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + ) + + +# x-ms-original-file: 2023-09-01/Entity_RemoveClassification.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_classification_by_unique_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_classification_by_unique_attribute.py new file mode 100644 index 000000000000..0e8a095f49c3 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_classification_by_unique_attribute.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_remove_classification_by_unique_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.remove_classification_by_unique_attribute( + type_name="column", + classification_name="MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + ) + + +# x-ms-original-file: 2023-09-01/Entity_RemoveClassificationByUniqueAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_labels.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_labels.py new file mode 100644 index 000000000000..829c9a5a3bfc --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_labels.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_remove_labels.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.remove_labels( + guid="02c373fe-2823-4be3-97fa-55180a9faa06", + ) + + +# x-ms-original-file: 2023-09-01/Entity_RemoveLabels.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_labels_by_unique_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_labels_by_unique_attribute.py new file mode 100644 index 000000000000..5c30b4ce7b08 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_remove_labels_by_unique_attribute.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_remove_labels_by_unique_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.remove_labels_by_unique_attribute( + type_name="Asset", + ) + + +# x-ms-original-file: 2023-09-01/Entity_RemoveLabelsByUniqueAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_set_labels.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_set_labels.py new file mode 100644 index 000000000000..5990daf42833 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_set_labels.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_set_labels.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.set_labels( + guid="02c373fe-2823-4be3-97fa-55180a9faa06", + ) + + +# x-ms-original-file: 2023-09-01/Entity_SetLabels.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_set_labels_by_unique_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_set_labels_by_unique_attribute.py new file mode 100644 index 000000000000..712f02d64fa2 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_set_labels_by_unique_attribute.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_set_labels_by_unique_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.set_labels_by_unique_attribute( + type_name="Asset", + ) + + +# x-ms-original-file: 2023-09-01/Entity_SetLabelsByUniqueAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_update.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_update.py new file mode 100644 index 000000000000..f1132c69742b --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_update.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.entity.create_or_update( + body={ + "entity": { + "attributes": { + "createTime": 0, + "description": None, + "modifiedTime": 0, + "name": "ExampleStorageAccount", + "owner": "ExampleOwner", + "publicAccessLevel": None, + "qualifiedName": "exampleaccount", + }, + "contacts": { + "Expert": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Expert Info"}], + "Owner": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Owner Info"}], + }, + "createdBy": "ExampleCreator", + "status": "ACTIVE", + "typeName": "azure_storage_account", + "updatedBy": "ExampleUpdator", + "version": 0, + }, + "referredEntities": {}, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Entity_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_update_classifications.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_update_classifications.py new file mode 100644 index 000000000000..5103377bc7b2 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_update_classifications.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_update_classifications.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.update_classifications( + guid="45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", + body=[ + { + "entityGuid": "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", + "typeName": "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", + }, + { + "entityGuid": "45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", + "typeName": "MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER", + }, + ], + ) + + +# x-ms-original-file: 2023-09-01/Entity_UpdateClassifications.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/entity_update_classifications_by_unique_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/entity_update_classifications_by_unique_attribute.py new file mode 100644 index 000000000000..d2e1c3c28ac8 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/entity_update_classifications_by_unique_attribute.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python entity_update_classifications_by_unique_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.entity.update_classifications_unique_by_attribute( + type_name="azure_storage_account", + body=[ + {"typeName": "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"}, + {"typeName": "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER"}, + ], + ) + + +# x-ms-original-file: 2023-09-01/Entity_UpdateClassificationsByUniqueAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_assign_term_to_entities.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_assign_term_to_entities.py new file mode 100644 index 000000000000..04b985b846cd --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_assign_term_to_entities.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_assign_term_to_entities.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.glossary.assign_term_to_entities( + term_id="8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", + body=[ + { + "guid": "ab9f1920-0b94-436d-aeb4-11a32c270fc0", + "relationshipAttributes": { + "attributes": { + "confidence": 100, + "description": "Example Description", + "expression": "Example Expression", + "source": "ExampleSource", + } + }, + } + ], + ) + + +# x-ms-original-file: 2023-09-01/Glossary_AssignTermToEntities.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_create.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create.py new file mode 100644 index 000000000000..1c50b7a7cba4 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.create( + body={ + "language": "en", + "longDescription": "Example Long Description", + "name": "Glossary", + "shortDescription": "Example Short Description", + "usage": "Example Glossary", + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_Create.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_categories.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_categories.py new file mode 100644 index 000000000000..4efefd82bb32 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_categories.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_create_categories.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.create_categories( + body=[ + {"anchor": {"glossaryGuid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8"}, "name": "ExampleCategory2"}, + {"anchor": {"glossaryGuid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8"}, "name": "ExampleCategory3"}, + ], + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_CreateCategories.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_category.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_category.py new file mode 100644 index 000000000000..6d67dc8de052 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_category.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_create_category.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.create_category( + body={ + "anchor": {"glossaryGuid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8"}, + "name": "ExampleCategory1", + "terms": [{"termGuid": "54688d39-b298-4104-9e80-f2a16f44aaea"}], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_CreateCategory.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_term.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_term.py new file mode 100644 index 000000000000..ed3a6690f313 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_term.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_create_term.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.create_term( + body={ + "abbreviation": "T1", + "anchor": {"glossaryGuid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8"}, + "contacts": { + "Expert": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Expert Info"}], + "Steward": [{"id": "30435ff9-9b96-44af-a5a9-e05c8b1ae2df", "info": "Example Steward info"}], + }, + "longDescription": "Example Long Description", + "name": "ExampleTerm1", + "resources": [{"displayName": "Example Display Name", "url": "Example Url"}], + "shortDescription": "Example Short Description", + "status": "Approved", + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_CreateTerm.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_term_with_template.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_term_with_template.py new file mode 100644 index 000000000000..909dd2908b6b --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_term_with_template.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_create_term_with_template.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.create_term( + body={ + "anchor": {"glossaryGuid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8"}, + "attributes": { + "ExampleTermTemplateAttribute": { + "date": 1606233600000, + "multi choice": ["Example Multi Choice A", "Example Multi Choice B"], + "plain string": "Example String", + "single choice": "Example Single Choice A", + } + }, + "name": "ExampleTerm", + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_CreateTermWithTemplate.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_terms.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_terms.py new file mode 100644 index 000000000000..9899519e6828 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_create_terms.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_create_terms.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.create_terms( + body=[ + { + "abbreviation": "T2", + "anchor": {"glossaryGuid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8"}, + "longDescription": "Example Long Description", + "name": "ExampleTerm2", + "resources": [{"displayName": "Example Display Name", "url": "Example Url"}], + "shortDescription": "Example Short Description", + "status": "Approved", + }, + { + "abbreviation": "T3", + "anchor": {"glossaryGuid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8"}, + "longDescription": "Example Long Description", + "name": "ExampleTerm3", + "resources": [{"displayName": "Example Display Name", "url": "Example Url"}], + "shortDescription": "Example Short Description", + "status": "Approved", + }, + ], + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_CreateTerms.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_delete.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_delete.py new file mode 100644 index 000000000000..4989a69588b3 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_delete.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.glossary.delete( + glossary_id="c0c54153-13d1-1608-13af-43457cdffe75", + ) + + +# x-ms-original-file: 2023-09-01/Glossary_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_delete_category.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_delete_category.py new file mode 100644 index 000000000000..622b19f6fd97 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_delete_category.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_delete_category.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.glossary.delete_category( + category_id="0e391355-252a-e5f3-ac18-5a3602df7616", + ) + + +# x-ms-original-file: 2023-09-01/Glossary_DeleteCategory.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_delete_term.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_delete_term.py new file mode 100644 index 000000000000..73f72ec6a525 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_delete_term.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_delete_term.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.glossary.delete_term( + term_id="b0942506-2d7d-1f45-d286-c29ca9e7f2ef", + ) + + +# x-ms-original-file: 2023-09-01/Glossary_DeleteTerm.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_get.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get.py new file mode 100644 index 000000000000..2dceb94d400e --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get( + glossary_id="47029611-67a1-42d5-8766-90eb904f7f22", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_category.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_category.py new file mode 100644 index 000000000000..061a5dba4be9 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_category.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_get_category.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_category( + category_id="ed7458f0-9463-48a5-b5c6-4f785fb34e12", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_GetCategory.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_detailed.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_detailed.py new file mode 100644 index 000000000000..a491837e172f --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_detailed.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_get_detailed.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_detailed( + glossary_id="c018ddaf-7c21-4b37-a838-dae5f110c3d8", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_GetDetailed.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_term.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_term.py new file mode 100644 index 000000000000..cd133915869c --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_term.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_get_term.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_term( + term_id="54688d39-b298-4104-9e80-f2a16f44aaea", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_GetTerm.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_term_without_assets.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_term_without_assets.py new file mode 100644 index 000000000000..6980b663cfb2 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_get_term_without_assets.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_get_term_without_assets.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_term( + term_id="54688d39-b298-4104-9e80-f2a16f44aaea", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_GetTermWithoutAssets.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_list.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list.py new file mode 100644 index 000000000000..f18a76370eda --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.batch_get() + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_List.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_categories.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_categories.py new file mode 100644 index 000000000000..142f781b87b6 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_categories.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_list_categories.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_categories( + glossary_id="c018ddaf-7c21-4b37-a838-dae5f110c3d8", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_ListCategories.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_categories_headers.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_categories_headers.py new file mode 100644 index 000000000000..6d6cba3ee13d --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_categories_headers.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_list_categories_headers.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_categories_headers( + glossary_id="c018ddaf-7c21-4b37-a838-dae5f110c3d8", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_ListCategoriesHeaders.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_category_terms.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_category_terms.py new file mode 100644 index 000000000000..5c0c481e1986 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_category_terms.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_list_category_terms.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_category_terms( + category_id="ed7458f0-9463-48a5-b5c6-4f785fb34e12", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_ListCategoryTerms.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_entities_assigned_with_term.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_entities_assigned_with_term.py new file mode 100644 index 000000000000..a5c07d86c06e --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_entities_assigned_with_term.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_list_entities_assigned_with_term.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_entities_assigned_with_term( + term_id="daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_ListEntitiesAssignedWithTerm.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_related_categories.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_related_categories.py new file mode 100644 index 000000000000..ce442d88314f --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_related_categories.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_list_related_categories.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_related_categories( + category_id="ed7458f0-9463-48a5-b5c6-4f785fb34e12", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_ListRelatedCategories.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_related_terms.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_related_terms.py new file mode 100644 index 000000000000..7a4201bb70ac --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_related_terms.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_list_related_terms.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_related_terms( + term_id="54688d39-b298-4104-9e80-f2a16f44aaea", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_ListRelatedTerms.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_term_headers.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_term_headers.py new file mode 100644 index 000000000000..80203d28d2ff --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_term_headers.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_list_term_headers.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_term_headers( + glossary_id="c018ddaf-7c21-4b37-a838-dae5f110c3d8", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_ListTermHeaders.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_terms.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_terms.py new file mode 100644 index 000000000000..da986ba23f61 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_list_terms.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_list_terms.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.get_terms( + glossary_id="c018ddaf-7c21-4b37-a838-dae5f110c3d8", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_ListTerms.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_partial_update.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_partial_update.py new file mode 100644 index 000000000000..fcc85c7cbac9 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_partial_update.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_partial_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.partial_update( + glossary_id="c018ddaf-7c21-4b37-a838-dae5f110c3d8", + body={"longDescription": "Example Long Description"}, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_PartialUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_partial_update_category.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_partial_update_category.py new file mode 100644 index 000000000000..857cc6346e7a --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_partial_update_category.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_partial_update_category.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.partial_update_category( + category_id="3243ea0a-9492-47e1-392e-a84e64980af9", + body={"longDescription": "Example Long Description"}, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_PartialUpdateCategory.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_partial_update_term.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_partial_update_term.py new file mode 100644 index 000000000000..9f6c345e17ec --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_partial_update_term.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_partial_update_term.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.partial_update_term( + term_id="54688d39-b298-4104-9e80-f2a16f44aaea", + body={"longDescription": "Example Long Description"}, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_PartialUpdateTerm.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_remove_term_assignment_from_entities.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_remove_term_assignment_from_entities.py new file mode 100644 index 000000000000..f81b64bb3d29 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_remove_term_assignment_from_entities.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_remove_term_assignment_from_entities.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.glossary.delete_term_assignment_from_entities( + term_id="8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", + body=[ + {"guid": "16feb2a1-2c79-ade1-338d-fb24fcb8b8bd", "relationshipGuid": "624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5"} + ], + ) + + +# x-ms-original-file: 2023-09-01/Glossary_RemoveTermAssignmentFromEntities.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_update.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_update.py new file mode 100644 index 000000000000..6b964c36e04a --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_update.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.update( + glossary_id="c018ddaf-7c21-4b37-a838-dae5f110c3d8", + body={ + "categories": [ + { + "categoryGuid": "0d6766f6-f4b6-435b-bda2-d3edc358998e", + "displayText": "ExampleCategory3", + "parentCategoryGuid": "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + "relationGuid": "26a486a4-a8e2-483c-8a84-3b88e909f8d2", + }, + { + "categoryGuid": "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + "displayText": "ExampleCategory1", + "parentCategoryGuid": "e47c4584-daca-4f9e-9092-194e04692c9a", + "relationGuid": "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + }, + { + "categoryGuid": "e47c4584-daca-4f9e-9092-194e04692c9a", + "displayText": "ExampleCategory2", + "relationGuid": "94071e56-fd3e-4441-93ff-1834f818482d", + }, + ], + "guid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + "language": "en", + "lastModifiedTS": "1", + "longDescription": "Example Long Description", + "name": "Glossary", + "qualifiedName": "Glossary", + "shortDescription": "Example Short Description", + "terms": [ + { + "displayText": "ExampleTerm1", + "relationGuid": "7b6a8149-a928-476a-a068-dce58653cfa0", + "termGuid": "54688d39-b298-4104-9e80-f2a16f44aaea", + }, + { + "displayText": "ExampleTerm2", + "relationGuid": "9385640b-e6be-437d-a6b9-62d11c14a189", + "termGuid": "952c7ba4-4c89-42d8-a05a-7d2161be7008", + }, + ], + "usage": "Example Glossary", + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_update_category.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_update_category.py new file mode 100644 index 000000000000..4c6dae024b4d --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_update_category.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_update_category.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.update_category( + category_id="ed7458f0-9463-48a5-b5c6-4f785fb34e12", + body={ + "anchor": { + "glossaryGuid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + "relationGuid": "7bdcef93-a57a-4d1d-95ab-9d3036f394a0", + }, + "childrenCategories": [{"categoryGuid": "0d6766f6-f4b6-435b-bda2-d3edc358998e"}], + "guid": "ed7458f0-9463-48a5-b5c6-4f785fb34e12", + "lastModifiedTS": "1", + "name": "ExampleCategory1", + "parentCategory": {"categoryGuid": "e47c4584-daca-4f9e-9092-194e04692c9a"}, + "qualifiedName": "ExampleCategory1@Glossary", + "terms": [ + { + "relationGuid": "6aebf5ac-0c83-40c0-98bf-958fe9c99007", + "termGuid": "54688d39-b298-4104-9e80-f2a16f44aaea", + } + ], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_UpdateCategory.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/glossary_update_term.py b/sdk/purview/azure-purview-datamap/generated_samples/glossary_update_term.py new file mode 100644 index 000000000000..340482b9d80a --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/glossary_update_term.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python glossary_update_term.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.glossary.update_term( + term_id="54688d39-b298-4104-9e80-f2a16f44aaea", + body={ + "abbreviation": "T1", + "anchor": { + "glossaryGuid": "c018ddaf-7c21-4b37-a838-dae5f110c3d8", + "relationGuid": "7b6a8149-a928-476a-a068-dce58653cfa0", + }, + "guid": "54688d39-b298-4104-9e80-f2a16f44aaea", + "lastModifiedTS": "1", + "name": "ExampleTerm1", + "qualifiedName": "ExampleTerm1@Glossary", + "resources": [{"displayName": "Example Display Name", "url": "Example Url"}], + "seeAlso": [ + {"termGuid": "952c7ba4-4c89-42d8-a05a-7d2161be7008"}, + {"termGuid": "821beef0-ced9-47ba-8f7f-c4f3459f4d18"}, + ], + "shortDescription": "Example Short Description", + "status": "Approved", + "synonyms": [ + {"termGuid": "952c7ba4-4c89-42d8-a05a-7d2161be7008"}, + {"termGuid": "821beef0-ced9-47ba-8f7f-c4f3459f4d18"}, + ], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Glossary_UpdateTerm.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/lineage_get.py b/sdk/purview/azure-purview-datamap/generated_samples/lineage_get.py new file mode 100644 index 000000000000..0f45708a648c --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/lineage_get.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python lineage_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.lineage.get( + guid="a6894eb3-81f3-829b-2adc-52f3e603411a", + direction="INPUT", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Lineage_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/lineage_get_by_unique_attribute.py b/sdk/purview/azure-purview-datamap/generated_samples/lineage_get_by_unique_attribute.py new file mode 100644 index 000000000000..3bcb7c24b3cd --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/lineage_get_by_unique_attribute.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python lineage_get_by_unique_attribute.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.lineage.get_by_unique_attribute( + type_name="azure_blob_path", + direction="BOTH", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Lineage_GetByUniqueAttribute.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/lineage_get_next_page.py b/sdk/purview/azure-purview-datamap/generated_samples/lineage_get_next_page.py new file mode 100644 index 000000000000..06c90c639cd3 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/lineage_get_next_page.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python lineage_get_next_page.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.lineage.get_next_page( + guid="a6894eb3-81f3-829b-2adc-52f3e603411a", + direction="INPUT", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Lineage_GetNextPage.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/relationship_create.py b/sdk/purview/azure-purview-datamap/generated_samples/relationship_create.py new file mode 100644 index 000000000000..4394a669eb21 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/relationship_create.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python relationship_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.relationship.create( + body={ + "attributes": { + "description": "Example Description", + "expression": "Example Expression", + "source": None, + "status": None, + "steward": "Example Steward", + }, + "createdBy": "ExampleCreator", + "end1": {"guid": "856d31e6-e342-a1ce-6273-22ddb77029c6", "typeName": "AtlasGlossaryTerm"}, + "end2": {"guid": "77481037-2874-9bdc-9b9e-76bb94ee71aa", "typeName": "AtlasGlossaryTerm"}, + "label": "r:AtlasGlossarySynonym", + "status": "ACTIVE", + "typeName": "AtlasGlossarySynonym", + "updatedBy": "ExampleUpdator", + "version": 0, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Relationship_Create.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/relationship_delete.py b/sdk/purview/azure-purview-datamap/generated_samples/relationship_delete.py new file mode 100644 index 000000000000..ef054c46cba1 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/relationship_delete.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python relationship_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.relationship.delete( + guid="5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", + ) + + +# x-ms-original-file: 2023-09-01/Relationship_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/relationship_get.py b/sdk/purview/azure-purview-datamap/generated_samples/relationship_get.py new file mode 100644 index 000000000000..84a080c3c31f --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/relationship_get.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python relationship_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.relationship.get( + guid="5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Relationship_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/relationship_update.py b/sdk/purview/azure-purview-datamap/generated_samples/relationship_update.py new file mode 100644 index 000000000000..1f95b3e04482 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/relationship_update.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python relationship_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.relationship.update( + body={ + "attributes": { + "description": "Example Description", + "expression": "Example Expression", + "source": None, + "status": None, + "steward": "Example Steward", + }, + "createdBy": "ExampleCreator", + "end1": {"guid": "77481037-2874-9bdc-9b9e-76bb94ee71aa", "typeName": "AtlasGlossaryTerm"}, + "end2": {"guid": "b0942506-2d7d-1f45-d286-c29ca9e7f2ef", "typeName": "AtlasGlossaryTerm"}, + "guid": "b2810301-293f-493f-88f1-7ac8784fb1fd", + "label": "r:AtlasGlossarySynonym", + "status": "ACTIVE", + "typeName": "AtlasGlossarySynonym", + "updatedBy": "ExampleUpdator", + "version": 0, + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Relationship_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_create.py b/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_create.py new file mode 100644 index 000000000000..067ff4dcd83e --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_create.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_bulk_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.batch_create( + body={ + "classificationDefs": [], + "entityDefs": [ + { + "attributeDefs": [ + { + "cardinality": "SET", + "isIndexable": False, + "isOptional": True, + "isUnique": False, + "name": "databases", + "typeName": "array", + } + ], + "name": "azure_sql_server_example", + "superTypes": ["azure_resource"], + "typeVersion": "1.0", + } + ], + "enumDefs": [], + "relationshipDefs": [], + "structDefs": [], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_BulkCreate.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_create_business_metadata_defs.py b/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_create_business_metadata_defs.py new file mode 100644 index 000000000000..46a7c70d7d88 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_create_business_metadata_defs.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_bulk_create_business_metadata_defs.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.batch_create( + body={ + "businessMetadataDefs": [ + { + "attributeDefs": [ + { + "cardinality": "SINGLE", + "isIndexable": True, + "isOptional": True, + "isUnique": False, + "name": "bizAttr1", + "options": {"applicableEntityTypes": '["Path"]', "maxStrLength": "50"}, + "typeName": "string", + } + ], + "description": "", + "name": "myBizMetadata1", + } + ], + "classificationDefs": [], + "entityDefs": [], + "enumDefs": [], + "relationshipDefs": [], + "structDefs": [], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_BulkCreateBusinessMetadataDefs.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_delete.py b/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_delete.py new file mode 100644 index 000000000000..0774e9e0a2f9 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_delete.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_bulk_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.type_definition.batch_delete( + body={ + "classificationDefs": [], + "entityDefs": [ + { + "attributeDefs": [ + { + "cardinality": "SET", + "isIndexable": False, + "isOptional": True, + "isUnique": False, + "name": "databases", + "typeName": "array", + } + ], + "name": "azure_sql_server_example", + "superTypes": ["azure_resource"], + "typeVersion": "1.0", + } + ], + "enumDefs": [], + "relationshipDefs": [], + "structDefs": [], + }, + ) + + +# x-ms-original-file: 2023-09-01/Type_BulkDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_update.py b/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_update.py new file mode 100644 index 000000000000..cf2592a93b7b --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_bulk_update.py @@ -0,0 +1,142 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_bulk_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.batch_update( + body={ + "classificationDefs": [], + "entityDefs": [ + { + "attributeDefs": [ + { + "cardinality": "SET", + "isIndexable": False, + "isOptional": True, + "isUnique": False, + "name": "databases", + "typeName": "array", + } + ], + "name": "azure_sql_server", + "superTypes": ["azure_resource"], + "typeVersion": "1.0", + }, + { + "attributeDefs": [ + { + "cardinality": "SINGLE", + "constraints": [{"params": {"attribute": "databases"}, "type": "inverseRef"}], + "isIndexable": False, + "isOptional": False, + "isUnique": False, + "name": "server", + "typeName": "azure_sql_server", + }, + { + "cardinality": "SET", + "isIndexable": False, + "isOptional": True, + "isUnique": False, + "name": "schemas", + "typeName": "array", + }, + { + "cardinality": "SINGLE", + "isIndexable": False, + "isOptional": True, + "isUnique": False, + "name": "collation", + "typeName": "string", + }, + { + "cardinality": "SINGLE", + "isIndexable": False, + "isOptional": True, + "isUnique": False, + "name": "compatibilityLevel", + "typeName": "int", + }, + ], + "name": "azure_sql_db", + "superTypes": ["azure_resource"], + "typeVersion": "1.0", + }, + ], + "enumDefs": [], + "relationshipDefs": [ + { + "endDef1": { + "cardinality": "SET", + "isContainer": True, + "isLegacyAttribute": True, + "name": "databases", + "type": "azure_sql_server", + }, + "endDef2": { + "cardinality": "SINGLE", + "isContainer": False, + "isLegacyAttribute": True, + "name": "server", + "type": "azure_sql_db", + }, + "name": "azure_sql_server_databases", + "relationshipCategory": "COMPOSITION", + "typeVersion": "1.0", + }, + { + "endDef1": { + "cardinality": "SET", + "isContainer": True, + "isLegacyAttribute": True, + "name": "schemas", + "type": "azure_sql_db", + }, + "endDef2": { + "cardinality": "SINGLE", + "isContainer": False, + "isLegacyAttribute": True, + "name": "db", + "type": "azure_sql_schema", + }, + "name": "azure_sql_db_schemas", + "relationshipCategory": "COMPOSITION", + "typeVersion": "1.0", + }, + ], + "structDefs": [], + }, + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_BulkUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_delete.py b/sdk/purview/azure-purview-datamap/generated_samples/type_delete.py new file mode 100644 index 000000000000..9411fe1df144 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_delete.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + client.type_definition.delete( + name="hive_order", + ) + + +# x-ms-original-file: 2023-09-01/Type_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_business_metadata_def_by_guid.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_business_metadata_def_by_guid.py new file mode 100644 index 000000000000..429deba9a335 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_business_metadata_def_by_guid.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_business_metadata_def_by_guid.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_business_metadata_by_id( + guid="d8757510-c866-61ba-486f-1afca09f43b8", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetBusinessMetadataDefByGuid.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_business_metadata_def_by_name.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_business_metadata_def_by_name.py new file mode 100644 index 000000000000..72517ab34ef6 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_business_metadata_def_by_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_business_metadata_def_by_name.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_business_metadata_by_name( + name="Business_Metadata_Type_Name", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetBusinessMetadataDefByName.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_by_guid.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_by_guid.py new file mode 100644 index 000000000000..25844ba7594e --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_by_guid.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_by_guid.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_by_id( + guid="0ddc2fcf-ad17-4d06-984a-ffb2ffb2a941", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetByGuid.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_by_name.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_by_name.py new file mode 100644 index 000000000000..2c935402d0d3 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_by_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_by_name.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_by_name( + name="glossary_term_status_value", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetByName.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_classification_def_by_guid.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_classification_def_by_guid.py new file mode 100644 index 000000000000..a7dec056fc62 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_classification_def_by_guid.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_classification_def_by_guid.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_classification_by_id( + guid="e79878fa-adba-4ee5-adc5-328d8841cd49", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetClassificationDefByGuid.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_classification_def_by_name.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_classification_def_by_name.py new file mode 100644 index 000000000000..605dbf5695bb --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_classification_def_by_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_classification_def_by_name.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_classification_by_name( + name="MICROSOFT.GOVERNMENT.CANADA.SOCIAL_INSURANCE_NUMBER", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetClassificationDefByName.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_entity_def_by_guid.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_entity_def_by_guid.py new file mode 100644 index 000000000000..c577d77ba9f7 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_entity_def_by_guid.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_entity_def_by_guid.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_entity_by_id( + guid="4bc54c37-98a8-4de8-9ee8-182610859d43", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetEntityDefByGuid.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_entity_def_by_name.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_entity_def_by_name.py new file mode 100644 index 000000000000..d7d5638ae586 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_entity_def_by_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_entity_def_by_name.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_entity_by_name( + name="DataSet", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetEntityDefByName.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_enum_def_by_guid.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_enum_def_by_guid.py new file mode 100644 index 000000000000..9ff7e64fc750 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_enum_def_by_guid.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_enum_def_by_guid.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_enum_by_id( + guid="644ab9c7-893a-4a4d-8e0a-591a6556d1a0", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetEnumDefByGuid.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_enum_def_by_name.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_enum_def_by_name.py new file mode 100644 index 000000000000..7d985143db01 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_enum_def_by_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_enum_def_by_name.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_enum_by_name( + name="hive_principal_type", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetEnumDefByName.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_relationship_def_by_guid.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_relationship_def_by_guid.py new file mode 100644 index 000000000000..b8b541ba666a --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_relationship_def_by_guid.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_relationship_def_by_guid.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_relationship_by_id( + guid="695edde1-2782-4a3c-841b-0b3aba25fe45", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetRelationshipDefByGuid.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_relationship_def_by_name.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_relationship_def_by_name.py new file mode 100644 index 000000000000..d0777d55c6d4 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_relationship_def_by_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_relationship_def_by_name.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_relationship_by_name( + name="storm_topology_nodes", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetRelationshipDefByName.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_struct_def_by_guid.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_struct_def_by_guid.py new file mode 100644 index 000000000000..5e8ba7e1e229 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_struct_def_by_guid.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_struct_def_by_guid.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_struct_by_id( + guid="f1571b6e-ad08-4040-a9a7-c30ed935d437", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetStructDefByGuid.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_struct_def_by_name.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_struct_def_by_name.py new file mode 100644 index 000000000000..351d63bcc57f --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_struct_def_by_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_struct_def_by_name.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_struct_by_name( + name="hive_order", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetStructDefByName.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_term_template_def_by_guid.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_term_template_def_by_guid.py new file mode 100644 index 000000000000..94d9260fbf91 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_term_template_def_by_guid.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_term_template_def_by_guid.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_term_template_by_id( + guid="d776af9c-985c-4168-abb2-477523dbfc70", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetTermTemplateDefByGuid.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_get_term_template_def_by_name.py b/sdk/purview/azure-purview-datamap/generated_samples/type_get_term_template_def_by_name.py new file mode 100644 index 000000000000..096234c4bbce --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_get_term_template_def_by_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_get_term_template_def_by_name.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_term_template_by_name( + name="MS KPI", + ) + print(response) + + +# x-ms-original-file: 2023-09-01/Type_GetTermTemplateDefByName.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_list.py b/sdk/purview/azure-purview-datamap/generated_samples/type_list.py new file mode 100644 index 000000000000..4f4f11c8e869 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get() + print(response) + + +# x-ms-original-file: 2023-09-01/Type_List.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_list_enum_defs.py b/sdk/purview/azure-purview-datamap/generated_samples/type_list_enum_defs.py new file mode 100644 index 000000000000..a451777e0b43 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_list_enum_defs.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_list_enum_defs.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get() + print(response) + + +# x-ms-original-file: 2023-09-01/Type_ListEnumDefs.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_list_headers.py b/sdk/purview/azure-purview-datamap/generated_samples/type_list_headers.py new file mode 100644 index 000000000000..46b8a525ce1a --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_list_headers.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_list_headers.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get_headers() + print(response) + + +# x-ms-original-file: 2023-09-01/Type_ListHeaders.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_samples/type_list_term_template_defs.py b/sdk/purview/azure-purview-datamap/generated_samples/type_list_term_template_defs.py new file mode 100644 index 000000000000..1e30808185fb --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_samples/type_list_term_template_defs.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.purview.datamap import DataMapClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-purview-datamap +# USAGE + python type_list_term_template_defs.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataMapClient( + endpoint="ENDPOINT", + credential=DefaultAzureCredential(), + ) + + response = client.type_definition.get() + print(response) + + +# x-ms-original-file: 2023-09-01/Type_ListTermTemplateDefs.json +if __name__ == "__main__": + main() diff --git a/sdk/purview/azure-purview-datamap/generated_tests/conftest.py b/sdk/purview/azure-purview-datamap/generated_tests/conftest.py new file mode 100644 index 000000000000..166268e3cb41 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/conftest.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import os +import pytest +from dotenv import load_dotenv +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) + +load_dotenv() + + +# For security, please avoid record sensitive identity information in recordings +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + datamap_subscription_id = os.environ.get("DATAMAP_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + datamap_tenant_id = os.environ.get("DATAMAP_TENANT_ID", "00000000-0000-0000-0000-000000000000") + datamap_client_id = os.environ.get("DATAMAP_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + datamap_client_secret = os.environ.get("DATAMAP_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=datamap_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=datamap_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=datamap_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=datamap_client_secret, value="00000000-0000-0000-0000-000000000000") + + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_discovery_operations.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_discovery_operations.py new file mode 100644 index 000000000000..80c62fd99705 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_discovery_operations.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DataMapClientTestBase, DataMapPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapDiscoveryOperations(DataMapClientTestBase): + @DataMapPreparer() + @recorded_by_proxy + def test_discovery_query(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.discovery.query( + body={ + "continuationToken": "str", + "facets": [{"count": 0, "facet": "str", "sort": {"count": "str", "value": "str"}}], + "filter": {}, + "keywords": "str", + "limit": 0, + "orderby": [{}], + "taxonomySetting": { + "assetTypes": ["str"], + "facet": {"count": 0, "facet": "str", "sort": {"count": "str", "value": "str"}}, + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_discovery_suggest(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.discovery.suggest( + body={"filter": {}, "keywords": "str", "limit": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_discovery_auto_complete(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.discovery.auto_complete( + body={"filter": {}, "keywords": "str", "limit": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_discovery_operations_async.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_discovery_operations_async.py new file mode 100644 index 000000000000..3166eeedaa98 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_discovery_operations_async.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DataMapPreparer +from testpreparer_async import DataMapClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapDiscoveryOperationsAsync(DataMapClientTestBaseAsync): + @DataMapPreparer() + @recorded_by_proxy_async + async def test_discovery_query(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.discovery.query( + body={ + "continuationToken": "str", + "facets": [{"count": 0, "facet": "str", "sort": {"count": "str", "value": "str"}}], + "filter": {}, + "keywords": "str", + "limit": 0, + "orderby": [{}], + "taxonomySetting": { + "assetTypes": ["str"], + "facet": {"count": 0, "facet": "str", "sort": {"count": "str", "value": "str"}}, + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_discovery_suggest(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.discovery.suggest( + body={"filter": {}, "keywords": "str", "limit": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_discovery_auto_complete(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.discovery.auto_complete( + body={"filter": {}, "keywords": "str", "limit": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_entity_operations.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_entity_operations.py new file mode 100644 index 000000000000..365c4ce91a43 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_entity_operations.py @@ -0,0 +1,791 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DataMapClientTestBase, DataMapPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapEntityOperations(DataMapClientTestBase): + @DataMapPreparer() + @recorded_by_proxy + def test_entity_create_or_update(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.create_or_update( + body={ + "entity": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + }, + "referredEntities": { + "str": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_get_by_ids(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.get_by_ids( + guid=["str"], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_batch_create_or_update(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.batch_create_or_update( + body={ + "entities": [ + { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "referredEntities": { + "str": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_batch_delete(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.batch_delete( + guid=["str"], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_add_classification(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.add_classification( + body={ + "classification": { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + }, + "entityGuids": ["str"], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_get(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.get( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_update_attribute_by_id(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.update_attribute_by_id( + guid="str", + body={}, + name="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_delete(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.delete( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_get_classification(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.get_classification( + guid="str", + classification_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_remove_classification(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.remove_classification( + guid="str", + classification_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_get_classifications(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.get_classifications( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_add_classifications(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.add_classifications( + guid="str", + body=[ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_update_classifications(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.update_classifications( + guid="str", + body=[ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_get_by_unique_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.get_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_update_by_unique_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.update_by_unique_attribute( + type_name="str", + body={ + "entity": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + }, + "referredEntities": { + "str": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_delete_by_unique_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.delete_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_remove_classification_by_unique_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.remove_classification_by_unique_attribute( + type_name="str", + classification_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_add_classifications_by_unique_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.add_classifications_by_unique_attribute( + type_name="str", + body=[ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_update_classifications_unique_by_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.update_classifications_unique_by_attribute( + type_name="str", + body=[ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_batch_set_classifications(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.batch_set_classifications( + body={ + "guidHeaderMap": { + "str": { + "attributes": {"str": {}}, + "classificationNames": ["str"], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "displayText": "str", + "guid": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meaningNames": ["str"], + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "status": "str", + "typeName": "str", + } + } + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_batch_get_by_unique_attributes(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.batch_get_by_unique_attributes( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_get_header(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.get_header( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_remove_business_metadata(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.remove_business_metadata( + guid="str", + body={"str": {"str": {}}}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_add_or_update_business_metadata(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.add_or_update_business_metadata( + guid="str", + body={"str": {"str": {}}}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_remove_business_metadata_attributes(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.remove_business_metadata_attributes( + business_metadata_name="str", + guid="str", + body={"str": {}}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_add_or_update_business_metadata_attributes(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.add_or_update_business_metadata_attributes( + business_metadata_name="str", + guid="str", + body={"str": {}}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_get_business_metadata_template(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.get_business_metadata_template() + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_import_business_metadata(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.import_business_metadata( + body={"file": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_remove_labels(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.remove_labels( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_set_labels(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.set_labels( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_add_label(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.add_label( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_remove_labels_by_unique_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.remove_labels_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_set_labels_by_unique_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.set_labels_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_add_labels_by_unique_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.add_labels_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_entity_move_entities_to_collection(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.entity.move_entities_to_collection( + body={"entityGuids": ["str"]}, + collection_id="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_entity_operations_async.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_entity_operations_async.py new file mode 100644 index 000000000000..dfcf49921959 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_entity_operations_async.py @@ -0,0 +1,792 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DataMapPreparer +from testpreparer_async import DataMapClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapEntityOperationsAsync(DataMapClientTestBaseAsync): + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_create_or_update(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.create_or_update( + body={ + "entity": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + }, + "referredEntities": { + "str": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_get_by_ids(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.get_by_ids( + guid=["str"], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_batch_create_or_update(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.batch_create_or_update( + body={ + "entities": [ + { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "referredEntities": { + "str": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_batch_delete(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.batch_delete( + guid=["str"], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_add_classification(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.add_classification( + body={ + "classification": { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + }, + "entityGuids": ["str"], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_get(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.get( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_update_attribute_by_id(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.update_attribute_by_id( + guid="str", + body={}, + name="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_delete(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.delete( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_get_classification(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.get_classification( + guid="str", + classification_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_remove_classification(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.remove_classification( + guid="str", + classification_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_get_classifications(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.get_classifications( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_add_classifications(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.add_classifications( + guid="str", + body=[ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_update_classifications(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.update_classifications( + guid="str", + body=[ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_get_by_unique_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.get_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_update_by_unique_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.update_by_unique_attribute( + type_name="str", + body={ + "entity": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + }, + "referredEntities": { + "str": { + "attributes": {"str": {}}, + "businessAttributes": {"str": {}}, + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "collectionId": "str", + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "customAttributes": {"str": "str"}, + "guid": "str", + "homeId": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "provenanceType": 0, + "proxy": bool, + "relationshipAttributes": {"str": {}}, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_delete_by_unique_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.delete_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_remove_classification_by_unique_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.remove_classification_by_unique_attribute( + type_name="str", + classification_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_add_classifications_by_unique_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.add_classifications_by_unique_attribute( + type_name="str", + body=[ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_update_classifications_unique_by_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.update_classifications_unique_by_attribute( + type_name="str", + body=[ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_batch_set_classifications(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.batch_set_classifications( + body={ + "guidHeaderMap": { + "str": { + "attributes": {"str": {}}, + "classificationNames": ["str"], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "displayText": "str", + "guid": "str", + "isIncomplete": bool, + "labels": ["str"], + "lastModifiedTS": "str", + "meaningNames": ["str"], + "meanings": [ + { + "confidence": 0, + "createdBy": "str", + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "status": "str", + "typeName": "str", + } + } + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_batch_get_by_unique_attributes(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.batch_get_by_unique_attributes( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_get_header(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.get_header( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_remove_business_metadata(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.remove_business_metadata( + guid="str", + body={"str": {"str": {}}}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_add_or_update_business_metadata(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.add_or_update_business_metadata( + guid="str", + body={"str": {"str": {}}}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_remove_business_metadata_attributes(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.remove_business_metadata_attributes( + business_metadata_name="str", + guid="str", + body={"str": {}}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_add_or_update_business_metadata_attributes(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.add_or_update_business_metadata_attributes( + business_metadata_name="str", + guid="str", + body={"str": {}}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_get_business_metadata_template(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.get_business_metadata_template() + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_import_business_metadata(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.import_business_metadata( + body={"file": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_remove_labels(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.remove_labels( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_set_labels(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.set_labels( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_add_label(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.add_label( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_remove_labels_by_unique_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.remove_labels_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_set_labels_by_unique_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.set_labels_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_add_labels_by_unique_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.add_labels_by_unique_attribute( + type_name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_entity_move_entities_to_collection(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.entity.move_entities_to_collection( + body={"entityGuids": ["str"]}, + collection_id="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_glossary_operations.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_glossary_operations.py new file mode 100644 index 000000000000..f3964e0129d3 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_glossary_operations.py @@ -0,0 +1,1244 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DataMapClientTestBase, DataMapPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapGlossaryOperations(DataMapClientTestBase): + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_batch_get(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.batch_get() + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_create(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.create( + body={ + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "language": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_create_categories(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.create_categories( + body=[ + { + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "childrenCategories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "parentCategory": { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + }, + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_create_category(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.create_category( + body={ + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "childrenCategories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "parentCategory": { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + }, + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_category(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_category( + category_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_update_category(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.update_category( + category_id="str", + body={ + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "childrenCategories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "parentCategory": { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + }, + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_delete_category(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.delete_category( + category_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_partial_update_category(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.partial_update_category( + category_id="str", + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_related_categories(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_related_categories( + category_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_category_terms(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_category_terms( + category_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_create_term(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.create_term( + body={ + "abbreviation": "str", + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "antonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "assignedEntities": [ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": { + "attributes": {"str": {}}, + "lastModifiedTS": "str", + "typeName": "str", + }, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "attributes": {"str": {"str": {}}}, + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "relationGuid": "str", + "status": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "classifies": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "examples": ["str"], + "guid": "str", + "hierarchyInfo": [ + { + "displayText": "str", + "guid": "str", + "itemPath": "str", + "name": "str", + "properties": {"str": {}}, + "resourceId": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "isA": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "nickName": "str", + "preferredTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "preferredToTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "qualifiedName": "str", + "replacedBy": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "replacementTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "resources": [{"displayName": "str", "url": "str"}], + "seeAlso": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "shortDescription": "str", + "status": "str", + "synonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "templateName": [{}], + "translatedTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "translationTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + "validValues": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "validValuesFor": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_term(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_term( + term_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_update_term(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.update_term( + term_id="str", + body={ + "abbreviation": "str", + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "antonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "assignedEntities": [ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": { + "attributes": {"str": {}}, + "lastModifiedTS": "str", + "typeName": "str", + }, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "attributes": {"str": {"str": {}}}, + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "relationGuid": "str", + "status": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "classifies": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "examples": ["str"], + "guid": "str", + "hierarchyInfo": [ + { + "displayText": "str", + "guid": "str", + "itemPath": "str", + "name": "str", + "properties": {"str": {}}, + "resourceId": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "isA": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "nickName": "str", + "preferredTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "preferredToTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "qualifiedName": "str", + "replacedBy": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "replacementTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "resources": [{"displayName": "str", "url": "str"}], + "seeAlso": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "shortDescription": "str", + "status": "str", + "synonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "templateName": [{}], + "translatedTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "translationTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + "validValues": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "validValuesFor": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_delete_term(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.delete_term( + term_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_partial_update_term(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.partial_update_term( + term_id="str", + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_create_terms(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.create_terms( + body=[ + { + "abbreviation": "str", + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "antonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "assignedEntities": [ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": { + "attributes": {"str": {}}, + "lastModifiedTS": "str", + "typeName": "str", + }, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "attributes": {"str": {"str": {}}}, + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "relationGuid": "str", + "status": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "classifies": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "examples": ["str"], + "guid": "str", + "hierarchyInfo": [ + { + "displayText": "str", + "guid": "str", + "itemPath": "str", + "name": "str", + "properties": {"str": {}}, + "resourceId": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "isA": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "nickName": "str", + "preferredTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "preferredToTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "qualifiedName": "str", + "replacedBy": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "replacementTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "resources": [{"displayName": "str", "url": "str"}], + "seeAlso": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "shortDescription": "str", + "status": "str", + "synonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "templateName": [{}], + "translatedTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "translationTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + "validValues": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "validValuesFor": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_entities_assigned_with_term(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_entities_assigned_with_term( + term_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_assign_term_to_entities(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.assign_term_to_entities( + term_id="str", + body=[ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": {"attributes": {"str": {}}, "lastModifiedTS": "str", "typeName": "str"}, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_delete_term_assignment_from_entities(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.delete_term_assignment_from_entities( + term_id="str", + body=[ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": {"attributes": {"str": {}}, "lastModifiedTS": "str", "typeName": "str"}, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_related_terms(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_related_terms( + term_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_update(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.update( + glossary_id="str", + body={ + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "language": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_delete(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.delete( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_categories(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_categories( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_categories_headers(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_categories_headers( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_detailed(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_detailed( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_partial_update(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.partial_update( + glossary_id="str", + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_terms(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_terms( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_glossary_get_term_headers(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.glossary.get_term_headers( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_glossary_operations_async.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_glossary_operations_async.py new file mode 100644 index 000000000000..df5635c702ac --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_glossary_operations_async.py @@ -0,0 +1,1245 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DataMapPreparer +from testpreparer_async import DataMapClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapGlossaryOperationsAsync(DataMapClientTestBaseAsync): + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_batch_get(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.batch_get() + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_create(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.create( + body={ + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "language": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_create_categories(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.create_categories( + body=[ + { + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "childrenCategories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "parentCategory": { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + }, + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_create_category(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.create_category( + body={ + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "childrenCategories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "parentCategory": { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + }, + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_category(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_category( + category_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_update_category(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.update_category( + category_id="str", + body={ + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "childrenCategories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "parentCategory": { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + }, + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_delete_category(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.delete_category( + category_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_partial_update_category(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.partial_update_category( + category_id="str", + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_related_categories(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_related_categories( + category_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_category_terms(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_category_terms( + category_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_create_term(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.create_term( + body={ + "abbreviation": "str", + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "antonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "assignedEntities": [ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": { + "attributes": {"str": {}}, + "lastModifiedTS": "str", + "typeName": "str", + }, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "attributes": {"str": {"str": {}}}, + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "relationGuid": "str", + "status": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "classifies": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "examples": ["str"], + "guid": "str", + "hierarchyInfo": [ + { + "displayText": "str", + "guid": "str", + "itemPath": "str", + "name": "str", + "properties": {"str": {}}, + "resourceId": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "isA": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "nickName": "str", + "preferredTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "preferredToTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "qualifiedName": "str", + "replacedBy": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "replacementTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "resources": [{"displayName": "str", "url": "str"}], + "seeAlso": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "shortDescription": "str", + "status": "str", + "synonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "templateName": [{}], + "translatedTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "translationTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + "validValues": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "validValuesFor": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_term(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_term( + term_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_update_term(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.update_term( + term_id="str", + body={ + "abbreviation": "str", + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "antonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "assignedEntities": [ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": { + "attributes": {"str": {}}, + "lastModifiedTS": "str", + "typeName": "str", + }, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "attributes": {"str": {"str": {}}}, + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "relationGuid": "str", + "status": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "classifies": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "examples": ["str"], + "guid": "str", + "hierarchyInfo": [ + { + "displayText": "str", + "guid": "str", + "itemPath": "str", + "name": "str", + "properties": {"str": {}}, + "resourceId": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "isA": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "nickName": "str", + "preferredTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "preferredToTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "qualifiedName": "str", + "replacedBy": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "replacementTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "resources": [{"displayName": "str", "url": "str"}], + "seeAlso": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "shortDescription": "str", + "status": "str", + "synonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "templateName": [{}], + "translatedTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "translationTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + "validValues": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "validValuesFor": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_delete_term(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.delete_term( + term_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_partial_update_term(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.partial_update_term( + term_id="str", + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_create_terms(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.create_terms( + body=[ + { + "abbreviation": "str", + "anchor": {"displayText": "str", "glossaryGuid": "str", "relationGuid": "str"}, + "antonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "assignedEntities": [ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": { + "attributes": {"str": {}}, + "lastModifiedTS": "str", + "typeName": "str", + }, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "attributes": {"str": {"str": {}}}, + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "relationGuid": "str", + "status": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "classifies": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "contacts": {"str": [{"id": "str", "info": "str"}]}, + "createTime": 0, + "createdBy": "str", + "examples": ["str"], + "guid": "str", + "hierarchyInfo": [ + { + "displayText": "str", + "guid": "str", + "itemPath": "str", + "name": "str", + "properties": {"str": {}}, + "resourceId": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + "isA": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "nickName": "str", + "preferredTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "preferredToTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "qualifiedName": "str", + "replacedBy": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "replacementTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "resources": [{"displayName": "str", "url": "str"}], + "seeAlso": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "shortDescription": "str", + "status": "str", + "synonyms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "templateName": [{}], + "translatedTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "translationTerms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + "validValues": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "validValuesFor": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_entities_assigned_with_term(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_entities_assigned_with_term( + term_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_assign_term_to_entities(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.assign_term_to_entities( + term_id="str", + body=[ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": {"attributes": {"str": {}}, "lastModifiedTS": "str", "typeName": "str"}, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_delete_term_assignment_from_entities(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.delete_term_assignment_from_entities( + term_id="str", + body=[ + { + "displayText": "str", + "entityStatus": "str", + "guid": "str", + "relationshipAttributes": {"attributes": {"str": {}}, "lastModifiedTS": "str", "typeName": "str"}, + "relationshipGuid": "str", + "relationshipStatus": "str", + "relationshipType": "str", + "typeName": "str", + "uniqueAttributes": {"str": {}}, + } + ], + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_related_terms(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_related_terms( + term_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_update(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.update( + glossary_id="str", + body={ + "categories": [ + { + "categoryGuid": "str", + "description": "str", + "displayText": "str", + "parentCategoryGuid": "str", + "relationGuid": "str", + } + ], + "classifications": [ + { + "attributes": {"str": {}}, + "entityGuid": "str", + "entityStatus": "str", + "lastModifiedTS": "str", + "removePropagationsOnEntityDelete": bool, + "typeName": "str", + "validityPeriods": [{"endTime": "str", "startTime": "str", "timeZone": "str"}], + } + ], + "createTime": 0, + "createdBy": "str", + "guid": "str", + "language": "str", + "lastModifiedTS": "str", + "longDescription": "str", + "name": "str", + "qualifiedName": "str", + "shortDescription": "str", + "terms": [ + { + "description": "str", + "displayText": "str", + "expression": "str", + "relationGuid": "str", + "status": "str", + "steward": "str", + "termGuid": "str", + } + ], + "updateTime": 0, + "updatedBy": "str", + "usage": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_delete(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.delete( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_categories(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_categories( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_categories_headers(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_categories_headers( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_detailed(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_detailed( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_partial_update(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.partial_update( + glossary_id="str", + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_terms(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_terms( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_glossary_get_term_headers(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.glossary.get_term_headers( + glossary_id="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_lineage_operations.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_lineage_operations.py new file mode 100644 index 000000000000..945fd90fcbf2 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_lineage_operations.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DataMapClientTestBase, DataMapPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapLineageOperations(DataMapClientTestBase): + @DataMapPreparer() + @recorded_by_proxy + def test_lineage_get(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.lineage.get( + guid="str", + direction="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_lineage_get_next_page(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.lineage.get_next_page( + guid="str", + direction="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_lineage_get_by_unique_attribute(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.lineage.get_by_unique_attribute( + type_name="str", + direction="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_lineage_operations_async.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_lineage_operations_async.py new file mode 100644 index 000000000000..7c71a08f5c93 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_lineage_operations_async.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DataMapPreparer +from testpreparer_async import DataMapClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapLineageOperationsAsync(DataMapClientTestBaseAsync): + @DataMapPreparer() + @recorded_by_proxy_async + async def test_lineage_get(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.lineage.get( + guid="str", + direction="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_lineage_get_next_page(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.lineage.get_next_page( + guid="str", + direction="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_lineage_get_by_unique_attribute(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.lineage.get_by_unique_attribute( + type_name="str", + direction="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_relationship_operations.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_relationship_operations.py new file mode 100644 index 000000000000..425eaddedaf6 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_relationship_operations.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DataMapClientTestBase, DataMapPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapRelationshipOperations(DataMapClientTestBase): + @DataMapPreparer() + @recorded_by_proxy + def test_relationship_create(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.relationship.create( + body={ + "attributes": {"str": {}}, + "createTime": 0, + "createdBy": "str", + "end1": {"guid": "str", "typeName": "str", "uniqueAttributes": {"str": {}}}, + "end2": {"guid": "str", "typeName": "str", "uniqueAttributes": {"str": {}}}, + "guid": "str", + "homeId": "str", + "label": "str", + "lastModifiedTS": "str", + "provenanceType": 0, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_relationship_update(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.relationship.update( + body={ + "attributes": {"str": {}}, + "createTime": 0, + "createdBy": "str", + "end1": {"guid": "str", "typeName": "str", "uniqueAttributes": {"str": {}}}, + "end2": {"guid": "str", "typeName": "str", "uniqueAttributes": {"str": {}}}, + "guid": "str", + "homeId": "str", + "label": "str", + "lastModifiedTS": "str", + "provenanceType": 0, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_relationship_get(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.relationship.get( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_relationship_delete(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.relationship.delete( + guid="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_relationship_operations_async.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_relationship_operations_async.py new file mode 100644 index 000000000000..9141161ded3a --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_relationship_operations_async.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DataMapPreparer +from testpreparer_async import DataMapClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapRelationshipOperationsAsync(DataMapClientTestBaseAsync): + @DataMapPreparer() + @recorded_by_proxy_async + async def test_relationship_create(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.relationship.create( + body={ + "attributes": {"str": {}}, + "createTime": 0, + "createdBy": "str", + "end1": {"guid": "str", "typeName": "str", "uniqueAttributes": {"str": {}}}, + "end2": {"guid": "str", "typeName": "str", "uniqueAttributes": {"str": {}}}, + "guid": "str", + "homeId": "str", + "label": "str", + "lastModifiedTS": "str", + "provenanceType": 0, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_relationship_update(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.relationship.update( + body={ + "attributes": {"str": {}}, + "createTime": 0, + "createdBy": "str", + "end1": {"guid": "str", "typeName": "str", "uniqueAttributes": {"str": {}}}, + "end2": {"guid": "str", "typeName": "str", "uniqueAttributes": {"str": {}}}, + "guid": "str", + "homeId": "str", + "label": "str", + "lastModifiedTS": "str", + "provenanceType": 0, + "status": "str", + "typeName": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_relationship_get(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.relationship.get( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_relationship_delete(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.relationship.delete( + guid="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_type_definition_operations.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_type_definition_operations.py new file mode 100644 index 000000000000..81beeed337be --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_type_definition_operations.py @@ -0,0 +1,1743 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DataMapClientTestBase, DataMapPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapTypeDefinitionOperations(DataMapClientTestBase): + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_business_metadata_by_id(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_business_metadata_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_business_metadata_by_name(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_business_metadata_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_classification_by_id(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_classification_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_classification_by_name(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_classification_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_entity_by_id(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_entity_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_entity_by_name(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_entity_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_enum_by_id(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_enum_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_enum_by_name(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_enum_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_relationship_by_id(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_relationship_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_relationship_by_name(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_relationship_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_struct_by_id(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_struct_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_struct_by_name(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_struct_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_by_id(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_by_name(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_delete(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.delete( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get() + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_batch_create(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.batch_create( + body={ + "businessMetadataDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "classificationDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "entityTypes": ["str"], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "entityDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipAttributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isLegacyAttribute": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "relationshipTypeName": "str", + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "enumDefs": [ + { + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "defaultValue": "str", + "description": "str", + "elementDefs": [{"description": "str", "ordinal": 0, "value": "str"}], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "relationshipDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "endDef1": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "endDef2": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipCategory": "str", + "relationshipLabel": "str", + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "structDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "termTemplateDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_batch_update(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.batch_update( + body={ + "businessMetadataDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "classificationDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "entityTypes": ["str"], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "entityDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipAttributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isLegacyAttribute": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "relationshipTypeName": "str", + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "enumDefs": [ + { + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "defaultValue": "str", + "description": "str", + "elementDefs": [{"description": "str", "ordinal": 0, "value": "str"}], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "relationshipDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "endDef1": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "endDef2": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipCategory": "str", + "relationshipLabel": "str", + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "structDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "termTemplateDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_batch_delete(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.batch_delete( + body={ + "businessMetadataDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "classificationDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "entityTypes": ["str"], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "entityDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipAttributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isLegacyAttribute": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "relationshipTypeName": "str", + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "enumDefs": [ + { + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "defaultValue": "str", + "description": "str", + "elementDefs": [{"description": "str", "ordinal": 0, "value": "str"}], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "relationshipDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "endDef1": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "endDef2": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipCategory": "str", + "relationshipLabel": "str", + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "structDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "termTemplateDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_headers(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_headers() + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_term_template_by_id(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_term_template_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy + def test_type_definition_get_term_template_by_name(self, datamap_endpoint): + client = self.create_client(endpoint=datamap_endpoint) + response = client.type_definition.get_term_template_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_type_definition_operations_async.py b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_type_definition_operations_async.py new file mode 100644 index 000000000000..a8fbe4ca7b54 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/test_data_map_type_definition_operations_async.py @@ -0,0 +1,1744 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DataMapPreparer +from testpreparer_async import DataMapClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataMapTypeDefinitionOperationsAsync(DataMapClientTestBaseAsync): + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_business_metadata_by_id(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_business_metadata_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_business_metadata_by_name(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_business_metadata_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_classification_by_id(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_classification_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_classification_by_name(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_classification_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_entity_by_id(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_entity_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_entity_by_name(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_entity_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_enum_by_id(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_enum_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_enum_by_name(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_enum_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_relationship_by_id(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_relationship_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_relationship_by_name(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_relationship_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_struct_by_id(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_struct_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_struct_by_name(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_struct_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_by_id(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_by_name(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_delete(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.delete( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get() + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_batch_create(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.batch_create( + body={ + "businessMetadataDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "classificationDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "entityTypes": ["str"], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "entityDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipAttributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isLegacyAttribute": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "relationshipTypeName": "str", + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "enumDefs": [ + { + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "defaultValue": "str", + "description": "str", + "elementDefs": [{"description": "str", "ordinal": 0, "value": "str"}], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "relationshipDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "endDef1": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "endDef2": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipCategory": "str", + "relationshipLabel": "str", + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "structDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "termTemplateDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_batch_update(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.batch_update( + body={ + "businessMetadataDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "classificationDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "entityTypes": ["str"], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "entityDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipAttributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isLegacyAttribute": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "relationshipTypeName": "str", + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "enumDefs": [ + { + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "defaultValue": "str", + "description": "str", + "elementDefs": [{"description": "str", "ordinal": 0, "value": "str"}], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "relationshipDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "endDef1": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "endDef2": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipCategory": "str", + "relationshipLabel": "str", + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "structDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "termTemplateDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_batch_delete(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.batch_delete( + body={ + "businessMetadataDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "classificationDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "entityTypes": ["str"], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "entityDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipAttributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isLegacyAttribute": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "relationshipTypeName": "str", + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "serviceType": "str", + "subTypes": ["str"], + "superTypes": ["str"], + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "enumDefs": [ + { + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "defaultValue": "str", + "description": "str", + "elementDefs": [{"description": "str", "ordinal": 0, "value": "str"}], + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "relationshipDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "endDef1": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "endDef2": { + "cardinality": "str", + "description": "str", + "isContainer": bool, + "isLegacyAttribute": bool, + "name": "str", + "type": "str", + }, + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "relationshipCategory": "str", + "relationshipLabel": "str", + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "structDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + "termTemplateDefs": [ + { + "attributeDefs": [ + { + "cardinality": "str", + "constraints": [{"params": {"str": {}}, "type": "str"}], + "defaultValue": "str", + "description": "str", + "includeInNotification": bool, + "isIndexable": bool, + "isOptional": bool, + "isUnique": bool, + "name": "str", + "options": {"str": "str"}, + "typeName": "str", + "valuesMaxCount": 0, + "valuesMinCount": 0, + } + ], + "category": "str", + "createTime": 0, + "createdBy": "str", + "dateFormatter": { + "availableLocales": ["str"], + "calendar": 0.0, + "dateInstance": ..., + "dateTimeInstance": ..., + "instance": ..., + "lenient": bool, + "numberFormat": { + "availableLocales": ["str"], + "currency": "str", + "currencyInstance": ..., + "groupingUsed": bool, + "instance": ..., + "integerInstance": ..., + "maximumFractionDigits": 0, + "maximumIntegerDigits": 0, + "minimumFractionDigits": 0, + "minimumIntegerDigits": 0, + "numberInstance": ..., + "parseIntegerOnly": bool, + "percentInstance": ..., + "roundingMode": "str", + }, + "timeInstance": ..., + "timeZone": { + "availableIds": ["str"], + "default": ..., + "displayName": "str", + "dstSavings": 0, + "id": "str", + "rawOffset": 0, + }, + }, + "description": "str", + "guid": "str", + "lastModifiedTS": "str", + "name": "str", + "options": {"str": "str"}, + "serviceType": "str", + "typeVersion": "str", + "updateTime": 0, + "updatedBy": "str", + "version": 0, + } + ], + }, + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_headers(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_headers() + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_term_template_by_id(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_term_template_by_id( + guid="str", + ) + + # please add some check logic here by yourself + # ... + + @DataMapPreparer() + @recorded_by_proxy_async + async def test_type_definition_get_term_template_by_name(self, datamap_endpoint): + client = self.create_async_client(endpoint=datamap_endpoint) + response = await client.type_definition.get_term_template_by_name( + name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/purview/azure-purview-datamap/generated_tests/testpreparer.py b/sdk/purview/azure-purview-datamap/generated_tests/testpreparer.py new file mode 100644 index 000000000000..1a417fa36924 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/testpreparer.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from azure.purview.datamap import DataMapClient +from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer +import functools + + +class DataMapClientTestBase(AzureRecordedTestCase): + + def create_client(self, endpoint): + credential = self.get_credential(DataMapClient) + return self.create_client_from_credential( + DataMapClient, + credential=credential, + endpoint=endpoint, + ) + + +DataMapPreparer = functools.partial(PowerShellPreparer, "datamap", datamap_endpoint="https://fake_datamap_endpoint.com") diff --git a/sdk/purview/azure-purview-datamap/generated_tests/testpreparer_async.py b/sdk/purview/azure-purview-datamap/generated_tests/testpreparer_async.py new file mode 100644 index 000000000000..035da5a695a9 --- /dev/null +++ b/sdk/purview/azure-purview-datamap/generated_tests/testpreparer_async.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from azure.purview.datamap.aio import DataMapClient +from devtools_testutils import AzureRecordedTestCase + + +class DataMapClientTestBaseAsync(AzureRecordedTestCase): + + def create_async_client(self, endpoint): + credential = self.get_credential(DataMapClient, is_async=True) + return self.create_client_from_credential( + DataMapClient, + credential=credential, + endpoint=endpoint, + ) diff --git a/sdk/purview/azure-purview-datamap/sdk_packaging.toml b/sdk/purview/azure-purview-datamap/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/sdk/purview/azure-purview-datamap/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/sdk/purview/azure-purview-datamap/setup.py b/sdk/purview/azure-purview-datamap/setup.py index 2f897189a3b7..c4b15c7a9e18 100644 --- a/sdk/purview/azure-purview-datamap/setup.py +++ b/sdk/purview/azure-purview-datamap/setup.py @@ -63,8 +63,8 @@ "azure.purview.datamap": ["py.typed"], }, install_requires=[ - "isodate<1.0.0,>=0.6.1", - "azure-core<2.0.0,>=1.30.0", + "isodate>=0.6.1", + "azure-core>=1.30.0", "typing-extensions>=4.6.0", ], python_requires=">=3.8", diff --git a/sdk/purview/azure-purview-datamap/tsp-location.yaml b/sdk/purview/azure-purview-datamap/tsp-location.yaml index 32f245b54096..22640a75a63f 100644 --- a/sdk/purview/azure-purview-datamap/tsp-location.yaml +++ b/sdk/purview/azure-purview-datamap/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/purview/Azure.Analytics.Purview.DataMap -commit: 91fad07b9d7480cf1f49e387bd6be627c1aec0b5 +commit: aa82ae66eb50ea6624847006cacdea92f3c026c6 repo: Azure/azure-rest-api-specs additionalDirectories: