From 9a91cf100efd8e87b2da436584524f9b54faa8ee Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 22 Jan 2025 12:56:09 +0000 Subject: [PATCH] CodeGen from PR 32276 in Azure/azure-rest-api-specs Merge c7fb6c841c27fd4f6cba7f2565ae87dd19b23a99 into 3a17b429e962d7a1a01c3c8fcdded8c8a2364196 --- .../generated/DiscoveryAutoComplete.java | 29 ++++ .../datamap/generated/DiscoveryQuery.java | 50 +++++++ .../datamap/generated/DiscoveryQueryAnd.java | 28 ++++ .../generated/DiscoveryQueryAndOrNested.java | 28 ++++ .../generated/DiscoveryQueryAssetType.java | 28 ++++ .../generated/DiscoveryQueryAttribute.java | 28 ++++ ...scoveryQueryBusinessMetadataAttribute.java | 28 ++++ .../DiscoveryQueryClassification.java | 27 ++++ .../generated/DiscoveryQueryCollection.java | 26 ++++ .../generated/DiscoveryQueryFacet.java | 32 +++++ .../DiscoveryQueryFileExtension.java | 26 ++++ .../generated/DiscoveryQueryGlossaryTerm.java | 40 ++++++ .../datamap/generated/DiscoveryQueryId.java | 27 ++++ .../datamap/generated/DiscoveryQueryNot.java | 27 ++++ .../generated/DiscoveryQueryObjectType.java | 28 ++++ ...coveryQueryPaginationContinuationPage.java | 51 +++++++ .../DiscoveryQueryPaginationFirstPage.java | 50 +++++++ .../DiscoveryQueryPaginationLastPage.java | 51 +++++++ .../generated/DiscoveryQuerySystemTime.java | 28 ++++ .../generated/DiscoveryQueryTaxonomy.java | 37 +++++ .../DiscoveryQueryTermAssignment.java | 29 ++++ .../datamap/generated/DiscoveryQueryType.java | 27 ++++ .../datamap/generated/DiscoverySuggest.java | 28 ++++ ...ntityAddClassificationToEntityByGuids.java | 42 ++++++ .../generated/EntityAddClassifications.java | 27 ++++ ...tyAddClassificationsByUniqueAttribute.java | 25 ++++ .../generated/EntityAddCustomAttribute.java | 51 +++++++ .../datamap/generated/EntityAddLabel.java | 21 +++ .../EntityAddLabelsByUniqueAttribute.java | 21 +++ .../EntityAddOrUpdateBusinessAttribute.java | 37 +++++ .../EntityAddOrUpdateBusinessMetadata.java | 39 ++++++ .../generated/EntityBulkCreateOrUpdate.java | 81 +++++++++++ .../datamap/generated/EntityBulkDelete.java | 23 ++++ .../EntityBulkSetClassifications.java | 62 +++++++++ .../datamap/generated/EntityCreate.java | 62 +++++++++ .../EntityCreateOrUpdateWithRichText.java | 58 ++++++++ .../datamap/generated/EntityDelete.java | 21 +++ .../EntityDeleteByUniqueAttribute.java | 22 +++ .../purview/datamap/generated/EntityGet.java | 21 +++ .../EntityGetByUniqueAttributes.java | 22 +++ .../generated/EntityGetClassification.java | 22 +++ .../generated/EntityGetClassifications.java | 21 +++ .../datamap/generated/EntityGetHeader.java | 21 +++ ...tityGetSampleBusinessMetadataTemplate.java | 21 +++ .../EntityImportBusinessMetadata.java | 21 +++ .../datamap/generated/EntityListByGuids.java | 23 ++++ .../EntityListByUniqueAttributes.java | 22 +++ .../EntityMoveEntitiesToCollection.java | 25 ++++ .../EntityPartialUpdateAttributeByGuid.java | 24 ++++ ...EntityPartialUpdateByUniqueAttributes.java | 63 +++++++++ .../EntityRemoveBusinessAttribute.java | 37 +++++ .../EntityRemoveBusinessMetadata.java | 37 +++++ .../generated/EntityRemoveClassification.java | 21 +++ ...RemoveClassificationByUniqueAttribute.java | 21 +++ .../datamap/generated/EntityRemoveLabels.java | 21 +++ .../EntityRemoveLabelsByUniqueAttribute.java | 21 +++ .../datamap/generated/EntitySetLabels.java | 21 +++ .../EntitySetLabelsByUniqueAttribute.java | 21 +++ .../datamap/generated/EntityUpdate.java | 61 +++++++++ .../EntityUpdateClassifications.java | 27 ++++ ...pdateClassificationsByUniqueAttribute.java | 25 ++++ .../GlossaryAssignTermToEntities.java | 46 +++++++ .../datamap/generated/GlossaryCreate.java | 27 ++++ .../generated/GlossaryCreateCategories.java | 29 ++++ .../generated/GlossaryCreateCategory.java | 28 ++++ .../datamap/generated/GlossaryCreateTerm.java | 56 ++++++++ .../GlossaryCreateTermWithTemplate.java | 49 +++++++ .../generated/GlossaryCreateTerms.java | 49 +++++++ .../datamap/generated/GlossaryDelete.java | 21 +++ .../generated/GlossaryDeleteCategory.java | 21 +++ .../datamap/generated/GlossaryDeleteTerm.java | 21 +++ .../datamap/generated/GlossaryGet.java | 22 +++ .../generated/GlossaryGetCategory.java | 22 +++ .../generated/GlossaryGetDetailed.java | 22 +++ .../datamap/generated/GlossaryGetTerm.java | 22 +++ .../GlossaryGetTermWithoutAssets.java | 22 +++ .../datamap/generated/GlossaryList.java | 23 ++++ .../generated/GlossaryListCategories.java | 24 ++++ .../GlossaryListCategoriesHeaders.java | 24 ++++ .../generated/GlossaryListCategoryTerms.java | 24 ++++ .../GlossaryListEntitiesAssignedWithTerm.java | 24 ++++ .../GlossaryListRelatedCategories.java | 25 ++++ .../generated/GlossaryListRelatedTerms.java | 25 ++++ .../generated/GlossaryListTermHeaders.java | 24 ++++ .../datamap/generated/GlossaryListTerms.java | 24 ++++ .../generated/GlossaryPartialUpdate.java | 37 +++++ .../GlossaryPartialUpdateCategory.java | 37 +++++ .../generated/GlossaryPartialUpdateTerm.java | 37 +++++ ...ssaryRemoveTermAssignmentFromEntities.java | 25 ++++ .../datamap/generated/GlossaryUpdate.java | 53 ++++++++ .../generated/GlossaryUpdateCategory.java | 39 ++++++ .../datamap/generated/GlossaryUpdateTerm.java | 45 ++++++ .../purview/datamap/generated/LineageGet.java | 23 ++++ .../LineageGetByUniqueAttribute.java | 23 ++++ .../datamap/generated/LineageGetNextPage.java | 23 ++++ .../datamap/generated/RelationshipCreate.java | 55 ++++++++ .../datamap/generated/RelationshipDelete.java | 21 +++ .../datamap/generated/RelationshipGet.java | 22 +++ .../datamap/generated/RelationshipUpdate.java | 56 ++++++++ .../datamap/generated/TypeBulkCreate.java | 39 ++++++ .../TypeBulkCreateBusinessMetadataDefs.java | 54 ++++++++ .../datamap/generated/TypeBulkDelete.java | 38 ++++++ .../datamap/generated/TypeBulkUpdate.java | 128 ++++++++++++++++++ .../purview/datamap/generated/TypeDelete.java | 21 +++ .../TypeGetBusinessMetadataDefByGuid.java | 23 ++++ .../TypeGetBusinessMetadataDefByName.java | 23 ++++ .../datamap/generated/TypeGetByGuid.java | 22 +++ .../datamap/generated/TypeGetByName.java | 22 +++ .../TypeGetClassificationDefByGuid.java | 23 ++++ .../TypeGetClassificationDefByName.java | 23 ++++ .../generated/TypeGetEntityDefByGuid.java | 22 +++ .../generated/TypeGetEntityDefByName.java | 22 +++ .../generated/TypeGetEnumDefByGuid.java | 22 +++ .../generated/TypeGetEnumDefByName.java | 22 +++ .../TypeGetRelationshipDefByGuid.java | 23 ++++ .../TypeGetRelationshipDefByName.java | 22 +++ .../generated/TypeGetStructDefByGuid.java | 22 +++ .../generated/TypeGetStructDefByName.java | 22 +++ .../TypeGetTermTemplateDefByGuid.java | 22 +++ .../TypeGetTermTemplateDefByName.java | 22 +++ .../purview/datamap/generated/TypeList.java | 22 +++ .../datamap/generated/TypeListEnumDefs.java | 23 ++++ .../datamap/generated/TypeListHeaders.java | 23 ++++ .../generated/TypeListTermTemplateDefs.java | 23 ++++ .../tsp-location.yaml | 3 +- 125 files changed, 3864 insertions(+), 1 deletion(-) create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryAutoComplete.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQuery.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAnd.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAndOrNested.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAssetType.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryBusinessMetadataAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryClassification.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryCollection.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFacet.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFileExtension.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryGlossaryTerm.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryId.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryNot.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryObjectType.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationContinuationPage.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationFirstPage.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationLastPage.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQuerySystemTime.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryTaxonomy.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryTermAssignment.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryType.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoverySuggest.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassificationToEntityByGuids.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassifications.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassificationsByUniqueAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddCustomAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddLabel.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddLabelsByUniqueAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddOrUpdateBusinessAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddOrUpdateBusinessMetadata.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkCreateOrUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkDelete.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkSetClassifications.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityCreate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityCreateOrUpdateWithRichText.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityDelete.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityDeleteByUniqueAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGet.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetByUniqueAttributes.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetClassification.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetClassifications.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetHeader.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetSampleBusinessMetadataTemplate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityImportBusinessMetadata.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityListByGuids.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityListByUniqueAttributes.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityMoveEntitiesToCollection.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityPartialUpdateAttributeByGuid.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityPartialUpdateByUniqueAttributes.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveBusinessAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveBusinessMetadata.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveClassification.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveClassificationByUniqueAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveLabels.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveLabelsByUniqueAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntitySetLabels.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntitySetLabelsByUniqueAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdateClassifications.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdateClassificationsByUniqueAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryAssignTermToEntities.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateCategories.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateCategory.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTerm.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTermWithTemplate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTerms.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDelete.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDeleteCategory.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDeleteTerm.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGet.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetCategory.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetDetailed.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetTerm.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetTermWithoutAssets.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryList.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategories.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategoriesHeaders.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategoryTerms.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListEntitiesAssignedWithTerm.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListRelatedCategories.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListRelatedTerms.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListTermHeaders.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListTerms.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdateCategory.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdateTerm.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryRemoveTermAssignmentFromEntities.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdateCategory.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdateTerm.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGet.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGetByUniqueAttribute.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGetNextPage.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipCreate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipDelete.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipGet.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkCreate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkCreateBusinessMetadataDefs.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkDelete.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkUpdate.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeDelete.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetBusinessMetadataDefByGuid.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetBusinessMetadataDefByName.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetByGuid.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetByName.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetClassificationDefByGuid.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetClassificationDefByName.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEntityDefByGuid.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEntityDefByName.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEnumDefByGuid.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEnumDefByName.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetRelationshipDefByGuid.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetRelationshipDefByName.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetStructDefByGuid.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetStructDefByName.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetTermTemplateDefByGuid.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetTermTemplateDefByName.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeList.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListEnumDefs.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListHeaders.java create mode 100644 sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListTermTemplateDefs.java diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryAutoComplete.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryAutoComplete.java new file mode 100644 index 0000000000000..5b6e9c37b9a34 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryAutoComplete.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.AutoCompleteOptions; +import com.azure.analytics.purview.datamap.models.AutoCompleteResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryAutoComplete { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryautocomplete.discoveryautocomplete + AutoCompleteResult response + = discoveryClient.autoComplete(new AutoCompleteOptions().setKeywords("fakeTokenPlaceholder") + .setLimit(10) + .setFilter(BinaryData.fromBytes( + "{and=[{entityType=azure_blob_path, includeSubTypes=false}]}".getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryautocomplete.discoveryautocomplete + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQuery.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQuery.java new file mode 100644 index 0000000000000..923d27b3f0b9d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQuery.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.analytics.purview.datamap.models.SearchFacetItem; +import com.azure.analytics.purview.datamap.models.SearchFacetSort; +import com.azure.analytics.purview.datamap.models.SearchSortOrder; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +public class DiscoveryQuery { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquery + QueryResult response = discoveryClient.query(new QueryOptions().setKeywords("fakeTokenPlaceholder") + .setLimit(10) + .setOrderby(Arrays.asList(BinaryData.fromBytes("{name=ASC}".getBytes(StandardCharsets.UTF_8)), + BinaryData.fromBytes("{updateTime=DESC}".getBytes(StandardCharsets.UTF_8)))) + .setFilter(BinaryData + .fromBytes("{and=[{objectType=Files}, {entityType=azure_blob_path}]}".getBytes(StandardCharsets.UTF_8))) + .setFacets(Arrays.asList( + new SearchFacetItem().setCount(0) + .setFacet("assetType") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("classification") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("contactId") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("label") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("term") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND))))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquery + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAnd.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAnd.java new file mode 100644 index 0000000000000..6eb71b2795f46 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAnd.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryAnd { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryand + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes( + "{and=[{entityType=azure_blob_path}, {attributeName=qualifiedName, operator=contains, attributeValue=.csv}]}" + .getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryand + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAndOrNested.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAndOrNested.java new file mode 100644 index 0000000000000..4a24769c0c0e6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAndOrNested.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryAndOrNested { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryandornested + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes( + "{and=[{entityType=azure_blob_path}, {attributeName=qualifiedName, operator=contains, attributeValue=.csv}, {or=[{attributeName=name, operator=eq, attributeValue=exampledata.csv}, {attributeName=qualifiedName, operator=prefix, attributeValue=https://}]}]}" + .getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryandornested + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAssetType.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAssetType.java new file mode 100644 index 0000000000000..26b8071f3bf05 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAssetType.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryAssetType { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryassettype + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes( + "{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}]}" + .getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryassettype + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAttribute.java new file mode 100644 index 0000000000000..732e36cea9fb2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryAttribute.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryAttribute { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryattribute + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes( + "{or=[{attributeName=name, operator=eq, attributeValue=exampledata.csv}, {attributeName=createTime, operator=ge, attributeValue=1545580800000}, {attributeName=modifiedTime, operator=timerange, attributeValue=LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D}]}" + .getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryBusinessMetadataAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryBusinessMetadataAttribute.java new file mode 100644 index 0000000000000..64b11b739781f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryBusinessMetadataAttribute.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryBusinessMetadataAttribute { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerybusinessmetadataattribute + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes( + "{or=[{attributeName=., operator=eq|ne|contains|prefix, attributeValue=string value}, {attributeName=., operator=eq|ne|gt|ge|lt|le, attributeValue=123}, {attributeName=., operator=eq|ne, attributeValue=true}, {attributeName=., operator=timerange, attributeValue=LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D}]}" + .getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerybusinessmetadataattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryClassification.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryClassification.java new file mode 100644 index 0000000000000..9b5c2cfd786a2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryClassification.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryClassification { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryclassification + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes("{classification=MICROSOFT.PERSONAL.EMAIL, includeSubClassifications=true}" + .getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryclassification + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryCollection.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryCollection.java new file mode 100644 index 0000000000000..18d89d9565618 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryCollection.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryCollection { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerycollection + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes("{collectionId=collectionName}".getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerycollection + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFacet.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFacet.java new file mode 100644 index 0000000000000..70165f3b5d502 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFacet.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.analytics.purview.datamap.models.SearchFacetItem; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +public class DiscoveryQueryFacet { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryfacet + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes("{objectType=Tables}".getBytes(StandardCharsets.UTF_8))) + .setFacets(Arrays.asList(new SearchFacetItem().setCount(10).setFacet("assetType"), + new SearchFacetItem().setCount(10).setFacet("classification"), + new SearchFacetItem().setCount(10).setFacet("term"), + new SearchFacetItem().setCount(10).setFacet("label")))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryfacet + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFileExtension.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFileExtension.java new file mode 100644 index 0000000000000..4b27aed92e673 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryFileExtension.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryFileExtension { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryfileextension + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes("{and=[{fileExtension=txt}]}".getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryfileextension + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryGlossaryTerm.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryGlossaryTerm.java new file mode 100644 index 0000000000000..5a54e1eac57bd --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryGlossaryTerm.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.analytics.purview.datamap.models.SearchFacetItem; +import com.azure.analytics.purview.datamap.models.SearchFacetSort; +import com.azure.analytics.purview.datamap.models.SearchSortOrder; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +public class DiscoveryQueryGlossaryTerm { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryglossaryterm + QueryResult response = discoveryClient.query(new QueryOptions().setKeywords("fakeTokenPlaceholder") + .setLimit(10) + .setFilter(BinaryData.fromBytes( + "{and=[{objectType=Glossary terms}, {or=[{glossaryType=AtlasGlossary}, {glossaryType=AtlasGlossaryTerm}]}]}" + .getBytes(StandardCharsets.UTF_8))) + .setFacets(Arrays.asList( + new SearchFacetItem().setCount(10) + .setFacet("termStatus") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("termTemplate") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND))))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryglossaryterm + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryId.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryId.java new file mode 100644 index 0000000000000..d48561cc74857 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryId.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryId { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryid + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData + .fromBytes("{and=[{id=bfecbcc3-1838-45fe-96d6-112de8a170f9}]}".getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryNot.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryNot.java new file mode 100644 index 0000000000000..c81ecc3806cd1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryNot.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryNot { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerynot + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData + .fromBytes("{not={classification=MICROSOFT.SYSTEM.TEMP_FILE}}".getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerynot + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryObjectType.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryObjectType.java new file mode 100644 index 0000000000000..3e1232b7d3db5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryObjectType.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryObjectType { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryobjecttype + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes( + "{or=[{objectType=Dashboards}, {objectType=Data pipelines}, {objectType=Files}, {objectType=Folders}, {objectType=Glossary terms}, {objectType=Reports}, {objectType=Stored procedures}, {objectType=Tables}]}" + .getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryqueryobjecttype + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationContinuationPage.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationContinuationPage.java new file mode 100644 index 0000000000000..d588ab6319737 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationContinuationPage.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.analytics.purview.datamap.models.SearchFacetItem; +import com.azure.analytics.purview.datamap.models.SearchFacetSort; +import com.azure.analytics.purview.datamap.models.SearchSortOrder; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +public class DiscoveryQueryPaginationContinuationPage { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerypaginationcontinuationpage + QueryResult response = discoveryClient.query(new QueryOptions().setKeywords("fakeTokenPlaceholder") + .setLimit(2) + .setContinuationToken("fakeTokenPlaceholder") + .setOrderby(Arrays.asList(BinaryData.fromBytes("{name=ASC}".getBytes(StandardCharsets.UTF_8)), + BinaryData.fromBytes("{updateTime=DESC}".getBytes(StandardCharsets.UTF_8)))) + .setFilter(BinaryData + .fromBytes("{and=[{objectType=Files}, {entityType=azure_blob_path}]}".getBytes(StandardCharsets.UTF_8))) + .setFacets(Arrays.asList( + new SearchFacetItem().setCount(0) + .setFacet("assetType") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("classification") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("contactId") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("label") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("term") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND))))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerypaginationcontinuationpage + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationFirstPage.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationFirstPage.java new file mode 100644 index 0000000000000..da89c1420d606 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationFirstPage.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.analytics.purview.datamap.models.SearchFacetItem; +import com.azure.analytics.purview.datamap.models.SearchFacetSort; +import com.azure.analytics.purview.datamap.models.SearchSortOrder; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +public class DiscoveryQueryPaginationFirstPage { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerypaginationfirstpage + QueryResult response = discoveryClient.query(new QueryOptions().setKeywords("fakeTokenPlaceholder") + .setLimit(2) + .setOrderby(Arrays.asList(BinaryData.fromBytes("{name=ASC}".getBytes(StandardCharsets.UTF_8)), + BinaryData.fromBytes("{updateTime=DESC}".getBytes(StandardCharsets.UTF_8)))) + .setFilter(BinaryData + .fromBytes("{and=[{objectType=Files}, {entityType=azure_blob_path}]}".getBytes(StandardCharsets.UTF_8))) + .setFacets(Arrays.asList( + new SearchFacetItem().setCount(0) + .setFacet("assetType") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("classification") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("contactId") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("label") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("term") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND))))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerypaginationfirstpage + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationLastPage.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationLastPage.java new file mode 100644 index 0000000000000..adaa31baafe58 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryPaginationLastPage.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.analytics.purview.datamap.models.SearchFacetItem; +import com.azure.analytics.purview.datamap.models.SearchFacetSort; +import com.azure.analytics.purview.datamap.models.SearchSortOrder; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +public class DiscoveryQueryPaginationLastPage { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerypaginationlastpage + QueryResult response = discoveryClient.query(new QueryOptions().setKeywords("fakeTokenPlaceholder") + .setLimit(2) + .setContinuationToken("fakeTokenPlaceholder") + .setOrderby(Arrays.asList(BinaryData.fromBytes("{name=ASC}".getBytes(StandardCharsets.UTF_8)), + BinaryData.fromBytes("{updateTime=DESC}".getBytes(StandardCharsets.UTF_8)))) + .setFilter(BinaryData + .fromBytes("{and=[{objectType=Files}, {entityType=azure_blob_path}]}".getBytes(StandardCharsets.UTF_8))) + .setFacets(Arrays.asList( + new SearchFacetItem().setCount(0) + .setFacet("assetType") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("classification") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("contactId") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("label") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND)), + new SearchFacetItem().setCount(10) + .setFacet("term") + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND))))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerypaginationlastpage + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQuerySystemTime.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQuerySystemTime.java new file mode 100644 index 0000000000000..72973bbb50541 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQuerySystemTime.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQuerySystemTime { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerysystemtime + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes( + "{or=[{createTime={operator=lt, timeThreshold=1545580800000}}, {updateTime=LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D}]}" + .getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerysystemtime + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryTaxonomy.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryTaxonomy.java new file mode 100644 index 0000000000000..b741fd54e6f4e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryTaxonomy.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.analytics.purview.datamap.models.SearchFacetItem; +import com.azure.analytics.purview.datamap.models.SearchFacetSort; +import com.azure.analytics.purview.datamap.models.SearchSortOrder; +import com.azure.analytics.purview.datamap.models.SearchTaxonomySetting; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +public class DiscoveryQueryTaxonomy { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerytaxonomy + QueryResult response = discoveryClient.query(new QueryOptions().setKeywords("fakeTokenPlaceholder") + .setLimit(10) + .setFilter(BinaryData.fromBytes( + "{and=[{objectType=Files}, {not={or=[{attributeName=size, operator=eq, attributeValue=0}, {attributeName=fileSize, operator=eq, attributeValue=0}]}}, {not={classification=MICROSOFT.SYSTEM.TEMP_FILE}}]}" + .getBytes(StandardCharsets.UTF_8))) + .setTaxonomySetting(new SearchTaxonomySetting().setAssetTypes(Arrays.asList("Azure Blob Storage")) + .setFacet(new SearchFacetItem().setCount(10) + .setSort(new SearchFacetSort().setCount(SearchSortOrder.DESCEND))))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerytaxonomy + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryTermAssignment.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryTermAssignment.java new file mode 100644 index 0000000000000..944c727a09ab5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryTermAssignment.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryTermAssignment { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerytermassignment + QueryResult response = discoveryClient.query(new QueryOptions().setKeywords("fakeTokenPlaceholder") + .setLimit(3) + .setFilter(BinaryData.fromBytes( + "{or=[{term=ExampleTerm}, {term=ExampleTerm, glossary=GlossaryName}, {termGuid=}]}" + .getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerytermassignment + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryType.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryType.java new file mode 100644 index 0000000000000..a0546d72d4d35 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoveryQueryType.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.QueryOptions; +import com.azure.analytics.purview.datamap.models.QueryResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoveryQueryType { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerytype + QueryResult response = discoveryClient.query(new QueryOptions().setLimit(10) + .setFilter(BinaryData.fromBytes( + "{and=[{entityType=azure_blob_path, includeSubTypes=false}]}".getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoveryquery.discoveryquerytype + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoverySuggest.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoverySuggest.java new file mode 100644 index 0000000000000..85c67928fe43c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/DiscoverySuggest.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.DiscoveryClient; +import com.azure.analytics.purview.datamap.models.SuggestOptions; +import com.azure.analytics.purview.datamap.models.SuggestResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class DiscoverySuggest { + public static void main(String[] args) { + DiscoveryClient discoveryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildDiscoveryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.discoverysuggest.discoverysuggest + SuggestResult response = discoveryClient.suggest(new SuggestOptions().setKeywords("fakeTokenPlaceholder") + .setLimit(10) + .setFilter(BinaryData.fromBytes( + "{and=[{entityType=azure_blob_path, includeSubTypes=false}]}".getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.discoverysuggest.discoverysuggest + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassificationToEntityByGuids.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassificationToEntityByGuids.java new file mode 100644 index 0000000000000..9071dfa4f5ed0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassificationToEntityByGuids.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasClassification; +import com.azure.analytics.purview.datamap.models.ClassificationAssociateOptions; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class EntityAddClassificationToEntityByGuids { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityaddclassification.entityaddclassificationtoentitybyguids + entityClient.addClassification(new ClassificationAssociateOptions() + .setClassification(new AtlasClassification().setAttributes(mapOf()) + .setTypeName("MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER") + .setValidityPeriods(Arrays.asList())) + .setEntityGuids( + Arrays.asList("784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa"))); + // END:com.azure.analytics.purview.datamap.generated.entityaddclassification.entityaddclassificationtoentitybyguids + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassifications.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassifications.java new file mode 100644 index 0000000000000..a5130fe924489 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassifications.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasClassification; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityAddClassifications { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityaddclassifications.entityaddclassifications + entityClient.addClassifications("cc0730ba-9b30-41f0-6953-559d17626d2b", + Arrays.asList( + new AtlasClassification().setTypeName("MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER") + .setEntityGuid("cc0730ba-9b30-41f0-6953-559d17626d2b"), + new AtlasClassification().setTypeName("MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER") + .setEntityGuid("cc0730ba-9b30-41f0-6953-559d17626d2b"))); + // END:com.azure.analytics.purview.datamap.generated.entityaddclassifications.entityaddclassifications + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassificationsByUniqueAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassificationsByUniqueAttribute.java new file mode 100644 index 0000000000000..58753feaaf632 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddClassificationsByUniqueAttribute.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasClassification; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityAddClassificationsByUniqueAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityaddclassificationsbyuniqueattribute.entityaddclassificationsbyuniqueattribute + entityClient.addClassificationsByUniqueAttribute("azure_storage_account", + Arrays.asList(new AtlasClassification().setTypeName("MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"), + new AtlasClassification().setTypeName("MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER")), + "https://exampleaccount.core.windows.net"); + // END:com.azure.analytics.purview.datamap.generated.entityaddclassificationsbyuniqueattribute.entityaddclassificationsbyuniqueattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddCustomAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddCustomAttribute.java new file mode 100644 index 0000000000000..67dad1b31543c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddCustomAttribute.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntity; +import com.azure.analytics.purview.datamap.models.AtlasEntityWithExtInfo; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class EntityAddCustomAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitycreateorupdate.entityaddcustomattribute + EntityMutationResult response + = entityClient.createOrUpdate(new AtlasEntityWithExtInfo().setReferredEntities(mapOf()) + .setEntity(new AtlasEntity() + .setAttributes(mapOf("owner", BinaryData.fromBytes("ExampleOwner".getBytes(StandardCharsets.UTF_8)), + "modifiedTime", BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "createTime", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "qualifiedName", + BinaryData + .fromBytes("https://exampleaccount.core.windows.net".getBytes(StandardCharsets.UTF_8)), + "name", BinaryData.fromBytes("ExampleStorageAccount".getBytes(StandardCharsets.UTF_8)), + "description", null, "publicAccessLevel", null)) + .setTypeName("azure_storage_account") + .setCustomAttributes(mapOf("custAttr1", "attr1", "custAttr2", "attr2"))), + null, null); + // END:com.azure.analytics.purview.datamap.generated.entitycreateorupdate.entityaddcustomattribute + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddLabel.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddLabel.java new file mode 100644 index 0000000000000..32a85a21ffc0c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddLabel.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityAddLabel { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityaddlabel.entityaddlabel + entityClient.addLabel("02c373fe-2823-4be3-97fa-55180a9faa06", Arrays.asList("label1", "label2")); + // END:com.azure.analytics.purview.datamap.generated.entityaddlabel.entityaddlabel + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddLabelsByUniqueAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddLabelsByUniqueAttribute.java new file mode 100644 index 0000000000000..58f904d3e2db2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddLabelsByUniqueAttribute.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityAddLabelsByUniqueAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityaddlabelsbyuniqueattribute.entityaddlabelsbyuniqueattribute + entityClient.addLabelsByUniqueAttribute("Asset", "https://asset1", Arrays.asList("label3")); + // END:com.azure.analytics.purview.datamap.generated.entityaddlabelsbyuniqueattribute.entityaddlabelsbyuniqueattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddOrUpdateBusinessAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddOrUpdateBusinessAttribute.java new file mode 100644 index 0000000000000..086da2f01d7a3 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddOrUpdateBusinessAttribute.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class EntityAddOrUpdateBusinessAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityaddorupdatebusinessmetadataattributes.entityaddorupdatebusinessattribute + entityClient.addOrUpdateBusinessMetadataAttributes("myBizMetaData1", "02c373fe-2823-4be3-97fa-55180a9faa06", + mapOf("bizAttr1", BinaryData.fromBytes("bizAttr1".getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.entityaddorupdatebusinessmetadataattributes.entityaddorupdatebusinessattribute + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddOrUpdateBusinessMetadata.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddOrUpdateBusinessMetadata.java new file mode 100644 index 0000000000000..9541fb608fc75 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityAddOrUpdateBusinessMetadata.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class EntityAddOrUpdateBusinessMetadata { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityaddorupdatebusinessmetadata.entityaddorupdatebusinessmetadata + entityClient.addOrUpdateBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", + mapOf("myBizMetadata1", + mapOf("bizAttr1", BinaryData.fromBytes("myBizMetaData1.bizAttr1".getBytes(StandardCharsets.UTF_8)))), + null); + // END:com.azure.analytics.purview.datamap.generated.entityaddorupdatebusinessmetadata.entityaddorupdatebusinessmetadata + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkCreateOrUpdate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkCreateOrUpdate.java new file mode 100644 index 0000000000000..46cff3bde1ff1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkCreateOrUpdate.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntitiesWithExtInfo; +import com.azure.analytics.purview.datamap.models.AtlasEntity; +import com.azure.analytics.purview.datamap.models.ContactInfo; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.analytics.purview.datamap.models.EntityStatus; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class EntityBulkCreateOrUpdate { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitybatchcreateorupdate.entitybulkcreateorupdate + EntityMutationResult response = entityClient.batchCreateOrUpdate(new AtlasEntitiesWithExtInfo() + .setReferredEntities(mapOf()) + .setEntities(Arrays.asList( + new AtlasEntity() + .setAttributes(mapOf("owner", BinaryData.fromBytes("ExampleOwner".getBytes(StandardCharsets.UTF_8)), + "modifiedTime", BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "createTime", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "qualifiedName", + BinaryData.fromBytes("exampleaccount1".getBytes(StandardCharsets.UTF_8)), "name", + BinaryData.fromBytes("ExampleStorageAccount1".getBytes(StandardCharsets.UTF_8)), "description", + null, "publicAccessLevel", null)) + .setTypeName("azure_storage_account") + .setCreatedBy("ExampleCreator") + .setStatus(EntityStatus.ACTIVE) + .setUpdatedBy("ExampleUpdator") + .setVersion(0L) + .setContacts(mapOf("Expert", Arrays.asList( + new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df").setInfo("Example Expert Info")), + "Owner", + Arrays + .asList(new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df") + .setInfo("Example Owner Info")))), + new AtlasEntity() + .setAttributes(mapOf("owner", BinaryData.fromBytes("ExampleOwner".getBytes(StandardCharsets.UTF_8)), + "modifiedTime", BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "createTime", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "qualifiedName", + BinaryData.fromBytes("exampleaccount2".getBytes(StandardCharsets.UTF_8)), "name", + BinaryData.fromBytes("ExampleStorageAccount2".getBytes(StandardCharsets.UTF_8)), "description", + BinaryData.fromBytes("Example Description".getBytes(StandardCharsets.UTF_8)), + "publicAccessLevel", null)) + .setTypeName("azure_storage_account") + .setCreatedBy("ExampleCreator") + .setStatus(EntityStatus.ACTIVE) + .setUpdatedBy("ExampleUpdator") + .setVersion(0L) + .setContacts(mapOf("Expert", + Arrays.asList(new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df") + .setInfo("Example Expert Info")), + "Owner", Arrays.asList(new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df") + .setInfo("Example Owner Info")))))), + null, null); + // END:com.azure.analytics.purview.datamap.generated.entitybatchcreateorupdate.entitybulkcreateorupdate + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkDelete.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkDelete.java new file mode 100644 index 0000000000000..043b386d0dabe --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkDelete.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityBulkDelete { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitybatchdelete.entitybulkdelete + EntityMutationResult response = entityClient + .batchDelete(Arrays.asList("18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b")); + // END:com.azure.analytics.purview.datamap.generated.entitybatchdelete.entitybulkdelete + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkSetClassifications.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkSetClassifications.java new file mode 100644 index 0000000000000..a9f76479a695c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityBulkSetClassifications.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasClassification; +import com.azure.analytics.purview.datamap.models.AtlasEntityHeader; +import com.azure.analytics.purview.datamap.models.AtlasEntityHeaders; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class EntityBulkSetClassifications { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitybatchsetclassifications.entitybulksetclassifications + List response + = entityClient + .batchSetClassifications( + new AtlasEntityHeaders() + .setGuidHeaderMap( + mapOf("9fb74c11-ac48-4650-95bc-760665c5bd92", + new AtlasEntityHeader() + .setAttributes( + mapOf("qualifiedName", + BinaryData.fromBytes("https://exampleaccount1.core.windows.net" + .getBytes(StandardCharsets.UTF_8)))) + .setTypeName("azure_storage_account") + .setClassifications(Arrays + .asList(new AtlasClassification().setTypeName("MICROSOFT.PERSONAL.EMAIL"))), + "7fcc43ab-55ea-45d4-9971-ce0443cb10bb", + new AtlasEntityHeader() + .setAttributes(mapOf("qualifiedName", + BinaryData.fromBytes("https://exampleaccount2.core.windows.net" + .getBytes(StandardCharsets.UTF_8)))) + .setTypeName("azure_storage_account") + .setClassifications(Arrays.asList( + new AtlasClassification().setTypeName("MICROSOFT.PERSONAL.IPADDRESS")))))); + // END:com.azure.analytics.purview.datamap.generated.entitybatchsetclassifications.entitybulksetclassifications + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityCreate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityCreate.java new file mode 100644 index 0000000000000..2caf153c4cf0b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityCreate.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntity; +import com.azure.analytics.purview.datamap.models.AtlasEntityWithExtInfo; +import com.azure.analytics.purview.datamap.models.ContactInfo; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.analytics.purview.datamap.models.EntityStatus; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class EntityCreate { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitycreateorupdate.entitycreate + EntityMutationResult response + = entityClient.createOrUpdate(new AtlasEntityWithExtInfo().setReferredEntities(mapOf()) + .setEntity(new AtlasEntity() + .setAttributes(mapOf("owner", BinaryData.fromBytes("ExampleOwner".getBytes(StandardCharsets.UTF_8)), + "modifiedTime", BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "createTime", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "qualifiedName", + BinaryData + .fromBytes("https://exampleaccount.core.windows.net".getBytes(StandardCharsets.UTF_8)), + "name", BinaryData.fromBytes("ExampleStorageAccount".getBytes(StandardCharsets.UTF_8)), + "description", null, "publicAccessLevel", null)) + .setTypeName("azure_storage_account") + .setCreatedBy("ExampleCreator") + .setStatus(EntityStatus.ACTIVE) + .setUpdatedBy("ExampleUpdator") + .setVersion(0L) + .setContacts(mapOf("Expert", + Arrays.asList(new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df") + .setInfo("Example Expert Info")), + "Owner", Arrays.asList(new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df") + .setInfo("Example Owner Info"))))), + null, null); + // END:com.azure.analytics.purview.datamap.generated.entitycreateorupdate.entitycreate + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityCreateOrUpdateWithRichText.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityCreateOrUpdateWithRichText.java new file mode 100644 index 0000000000000..6b2ca927eaa2a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityCreateOrUpdateWithRichText.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntity; +import com.azure.analytics.purview.datamap.models.AtlasEntityWithExtInfo; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.analytics.purview.datamap.models.EntityStatus; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class EntityCreateOrUpdateWithRichText { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitycreateorupdate.entitycreateorupdatewithrichtext + EntityMutationResult response + = entityClient.createOrUpdate(new AtlasEntityWithExtInfo().setReferredEntities(mapOf()) + .setEntity(new AtlasEntity() + .setAttributes(mapOf("owner", BinaryData.fromBytes("ExampleOwner".getBytes(StandardCharsets.UTF_8)), + "modifiedTime", BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "createTime", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "qualifiedName", + BinaryData + .fromBytes("https://exampleaccount.core.windows.net".getBytes(StandardCharsets.UTF_8)), + "name", BinaryData.fromBytes("ExampleStorageAccount".getBytes(StandardCharsets.UTF_8)), + "description", null, "userDescription", + BinaryData.fromBytes("
testing
".getBytes(StandardCharsets.UTF_8)), + "publicAccessLevel", null)) + .setTypeName("azure_storage_account") + .setCreatedBy("ExampleCreator") + .setCustomAttributes(mapOf("microsoft_isDescriptionRichText", "true")) + .setStatus(EntityStatus.ACTIVE) + .setUpdatedBy("ExampleUpdator") + .setVersion(0L)), + null, null); + // END:com.azure.analytics.purview.datamap.generated.entitycreateorupdate.entitycreateorupdatewithrichtext + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityDelete.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityDelete.java new file mode 100644 index 0000000000000..df1bd1847d972 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityDelete.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityDelete { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitydelete.entitydelete + EntityMutationResult response = entityClient.delete("fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f"); + // END:com.azure.analytics.purview.datamap.generated.entitydelete.entitydelete + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityDeleteByUniqueAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityDeleteByUniqueAttribute.java new file mode 100644 index 0000000000000..d8b9fb8eb2f49 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityDeleteByUniqueAttribute.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityDeleteByUniqueAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitydeletebyuniqueattribute.entitydeletebyuniqueattribute + EntityMutationResult response + = entityClient.deleteByUniqueAttribute("azure_storage_account", "https://exampleaccount.core.windows.net"); + // END:com.azure.analytics.purview.datamap.generated.entitydeletebyuniqueattribute.entitydeletebyuniqueattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGet.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGet.java new file mode 100644 index 0000000000000..e9074a344a047 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGet.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntityWithExtInfo; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityGet { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityget.entityget + AtlasEntityWithExtInfo response = entityClient.get("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", true, null); + // END:com.azure.analytics.purview.datamap.generated.entityget.entityget + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetByUniqueAttributes.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetByUniqueAttributes.java new file mode 100644 index 0000000000000..8fe183902ef5e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetByUniqueAttributes.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntityWithExtInfo; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityGetByUniqueAttributes { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitygetbyuniqueattribute.entitygetbyuniqueattributes + AtlasEntityWithExtInfo response = entityClient.getByUniqueAttribute("azure_storage_account", true, null, + "https://exampleaccount.core.windows.net"); + // END:com.azure.analytics.purview.datamap.generated.entitygetbyuniqueattribute.entitygetbyuniqueattributes + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetClassification.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetClassification.java new file mode 100644 index 0000000000000..259283102a2b6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetClassification.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasClassification; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityGetClassification { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitygetclassification.entitygetclassification + AtlasClassification response = entityClient.getClassification("9347abc5-7b86-4b82-a1e2-ad77c7c3cac3", + "MICROSOFT.PERSONAL.DATE_OF_BIRTH"); + // END:com.azure.analytics.purview.datamap.generated.entitygetclassification.entitygetclassification + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetClassifications.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetClassifications.java new file mode 100644 index 0000000000000..7ddfa3ae9c0f2 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetClassifications.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasClassifications; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityGetClassifications { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitygetclassifications.entitygetclassifications + AtlasClassifications response = entityClient.getClassifications("67d26de6-771d-1a2d-cb2b-dec4dbd2a9bd"); + // END:com.azure.analytics.purview.datamap.generated.entitygetclassifications.entitygetclassifications + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetHeader.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetHeader.java new file mode 100644 index 0000000000000..5cff071081ad1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetHeader.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntityHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityGetHeader { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitygetheader.entitygetheader + AtlasEntityHeader response = entityClient.getHeader("9fb74c11-ac48-4650-95bc-760665c5bd92"); + // END:com.azure.analytics.purview.datamap.generated.entitygetheader.entitygetheader + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetSampleBusinessMetadataTemplate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetSampleBusinessMetadataTemplate.java new file mode 100644 index 0000000000000..12405df3baa7e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityGetSampleBusinessMetadataTemplate.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityGetSampleBusinessMetadataTemplate { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitygetbusinessmetadatatemplate.entitygetsamplebusinessmetadatatemplate + BinaryData response = entityClient.getBusinessMetadataTemplate(); + // END:com.azure.analytics.purview.datamap.generated.entitygetbusinessmetadatatemplate.entitygetsamplebusinessmetadatatemplate + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityImportBusinessMetadata.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityImportBusinessMetadata.java new file mode 100644 index 0000000000000..f7739ac28391f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityImportBusinessMetadata.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.BulkImportResult; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityImportBusinessMetadata { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityimportbusinessmetadata.entityimportbusinessmetadata + BulkImportResult response = entityClient.importBusinessMetadata(null); + // END:com.azure.analytics.purview.datamap.generated.entityimportbusinessmetadata.entityimportbusinessmetadata + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityListByGuids.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityListByGuids.java new file mode 100644 index 0000000000000..917b8dff4f877 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityListByGuids.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntitiesWithExtInfo; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityListByGuids { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitygetbyids.entitylistbyguids + AtlasEntitiesWithExtInfo response = entityClient.getByIds( + Arrays.asList("784c0f2f-afd2-e26b-f9cb-984f6c2c5021", "b4ebc8be-cef4-860a-bee9-28cc34cb5caa"), true, null); + // END:com.azure.analytics.purview.datamap.generated.entitygetbyids.entitylistbyguids + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityListByUniqueAttributes.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityListByUniqueAttributes.java new file mode 100644 index 0000000000000..3be0824d9a246 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityListByUniqueAttributes.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntitiesWithExtInfo; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityListByUniqueAttributes { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitybatchgetbyuniqueattributes.entitylistbyuniqueattributes + AtlasEntitiesWithExtInfo response = entityClient.batchGetByUniqueAttributes("azure_storage_account", true, null, + "adl://exampleaccount.azuredatalakestore.net/123/1/DP_TFS/CBT/Extensions/DTTP.targets#:xml/Project/PropertyGroup/ExampleName1"); + // END:com.azure.analytics.purview.datamap.generated.entitybatchgetbyuniqueattributes.entitylistbyuniqueattributes + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityMoveEntitiesToCollection.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityMoveEntitiesToCollection.java new file mode 100644 index 0000000000000..65df604c212cf --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityMoveEntitiesToCollection.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.analytics.purview.datamap.models.MoveEntitiesOptions; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityMoveEntitiesToCollection { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitymoveentitiestocollection.entitymoveentitiestocollection + EntityMutationResult response + = entityClient.moveEntitiesToCollection("ExampleNewCollection", new MoveEntitiesOptions().setEntityGuids( + Arrays.asList("321493e3-3fb7-4b3e-9df7-3b69154174c2", "b2f9c306-cf65-4bb0-878e-cfaafde156b1"))); + // END:com.azure.analytics.purview.datamap.generated.entitymoveentitiestocollection.entitymoveentitiestocollection + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityPartialUpdateAttributeByGuid.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityPartialUpdateAttributeByGuid.java new file mode 100644 index 0000000000000..f1b6974d3b38e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityPartialUpdateAttributeByGuid.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; + +public class EntityPartialUpdateAttributeByGuid { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityupdateattributebyid.entitypartialupdateattributebyguid + EntityMutationResult response = entityClient.updateAttributeById("394d9a03-912e-483b-bbd2-bedee1a69798", + "ExampleName", BinaryData.fromBytes("ExampleNewName".getBytes(StandardCharsets.UTF_8))); + // END:com.azure.analytics.purview.datamap.generated.entityupdateattributebyid.entitypartialupdateattributebyguid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityPartialUpdateByUniqueAttributes.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityPartialUpdateByUniqueAttributes.java new file mode 100644 index 0000000000000..3d3641d3d4d75 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityPartialUpdateByUniqueAttributes.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntity; +import com.azure.analytics.purview.datamap.models.AtlasEntityWithExtInfo; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.analytics.purview.datamap.models.EntityStatus; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class EntityPartialUpdateByUniqueAttributes { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityupdatebyuniqueattribute.entitypartialupdatebyuniqueattributes + EntityMutationResult response + = entityClient + .updateByUniqueAttribute("azure_storage_account", + new AtlasEntityWithExtInfo().setReferredEntities(mapOf()) + .setEntity(new AtlasEntity() + .setAttributes(mapOf("owner", + BinaryData.fromBytes("ExampleOwner".getBytes(StandardCharsets.UTF_8)), "qualifiedName", + BinaryData.fromBytes( + "https://exampleaccount.core.windows.net".getBytes(StandardCharsets.UTF_8)), + "createTime", BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "name", + BinaryData.fromBytes("ExampleNewName".getBytes(StandardCharsets.UTF_8)))) + .setTypeName("azure_storage_account") + .setLastModifiedTS("1") + .setCreateTime(1605766397985L) + .setCreatedBy("8c062c84-5d25-449f-a990-9d8ab70b8ec7") + .setGuid("dc507ccf-0c57-4165-9327-f37b0d13fda0") + .setRelationshipAttributes( + mapOf("services", BinaryData.fromBytes("[]".getBytes(StandardCharsets.UTF_8)), + "meanings", BinaryData.fromBytes("[]".getBytes(StandardCharsets.UTF_8)))) + .setStatus(EntityStatus.ACTIVE) + .setUpdateTime(1605766397985L) + .setUpdatedBy("8c062c84-5d25-449f-a990-9d8ab70b8ec7") + .setVersion(0L)), + "https://exampleaccount.core.windows.net"); + // END:com.azure.analytics.purview.datamap.generated.entityupdatebyuniqueattribute.entitypartialupdatebyuniqueattributes + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveBusinessAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveBusinessAttribute.java new file mode 100644 index 0000000000000..4d436129c8641 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveBusinessAttribute.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class EntityRemoveBusinessAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityremovebusinessmetadataattributes.entityremovebusinessattribute + entityClient.removeBusinessMetadataAttributes("myBizMetaData1", "02c373fe-2823-4be3-97fa-55180a9faa06", + mapOf("bizAttr1", BinaryData.fromBytes("bizAttr1".getBytes(StandardCharsets.UTF_8)))); + // END:com.azure.analytics.purview.datamap.generated.entityremovebusinessmetadataattributes.entityremovebusinessattribute + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveBusinessMetadata.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveBusinessMetadata.java new file mode 100644 index 0000000000000..21df69a0b3dc4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveBusinessMetadata.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class EntityRemoveBusinessMetadata { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityremovebusinessmetadata.entityremovebusinessmetadata + entityClient.removeBusinessMetadata("02c373fe-2823-4be3-97fa-55180a9faa06", mapOf("myBizMetadata1", + mapOf("bizAttr1", BinaryData.fromBytes("myBizMetaData1.bizAttr1".getBytes(StandardCharsets.UTF_8))))); + // END:com.azure.analytics.purview.datamap.generated.entityremovebusinessmetadata.entityremovebusinessmetadata + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveClassification.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveClassification.java new file mode 100644 index 0000000000000..c9624ef89ce26 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveClassification.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityRemoveClassification { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityremoveclassification.entityremoveclassification + entityClient.removeClassification("cc0730ba-9b30-41f0-6953-559d17626d2b", + "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"); + // END:com.azure.analytics.purview.datamap.generated.entityremoveclassification.entityremoveclassification + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveClassificationByUniqueAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveClassificationByUniqueAttribute.java new file mode 100644 index 0000000000000..3bbabcd69baa8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveClassificationByUniqueAttribute.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class EntityRemoveClassificationByUniqueAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityremoveclassificationbyuniqueattribute.entityremoveclassificationbyuniqueattribute + entityClient.removeClassificationByUniqueAttribute("column", "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER", + "https://exampleaccount.blob.core.windows.net/examplecontainer/exampledata.csv"); + // END:com.azure.analytics.purview.datamap.generated.entityremoveclassificationbyuniqueattribute.entityremoveclassificationbyuniqueattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveLabels.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveLabels.java new file mode 100644 index 0000000000000..d0a844fc6b159 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveLabels.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityRemoveLabels { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityremovelabels.entityremovelabels + entityClient.removeLabels("02c373fe-2823-4be3-97fa-55180a9faa06", Arrays.asList("label1", "label2")); + // END:com.azure.analytics.purview.datamap.generated.entityremovelabels.entityremovelabels + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveLabelsByUniqueAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveLabelsByUniqueAttribute.java new file mode 100644 index 0000000000000..a1aa6e4c9fc46 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityRemoveLabelsByUniqueAttribute.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityRemoveLabelsByUniqueAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityremovelabelsbyuniqueattribute.entityremovelabelsbyuniqueattribute + entityClient.removeLabelsByUniqueAttribute("Asset", "https://asset1", Arrays.asList("label1")); + // END:com.azure.analytics.purview.datamap.generated.entityremovelabelsbyuniqueattribute.entityremovelabelsbyuniqueattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntitySetLabels.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntitySetLabels.java new file mode 100644 index 0000000000000..8e68a7164101f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntitySetLabels.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntitySetLabels { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitysetlabels.entitysetlabels + entityClient.setLabels("02c373fe-2823-4be3-97fa-55180a9faa06", Arrays.asList("label1", "label2")); + // END:com.azure.analytics.purview.datamap.generated.entitysetlabels.entitysetlabels + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntitySetLabelsByUniqueAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntitySetLabelsByUniqueAttribute.java new file mode 100644 index 0000000000000..08c11a0704a2e --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntitySetLabelsByUniqueAttribute.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntitySetLabelsByUniqueAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitysetlabelsbyuniqueattribute.entitysetlabelsbyuniqueattribute + entityClient.setLabelsByUniqueAttribute("Asset", "https://asset1", Arrays.asList("label1", "label2")); + // END:com.azure.analytics.purview.datamap.generated.entitysetlabelsbyuniqueattribute.entitysetlabelsbyuniqueattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdate.java new file mode 100644 index 0000000000000..47723b327dcee --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdate.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasEntity; +import com.azure.analytics.purview.datamap.models.AtlasEntityWithExtInfo; +import com.azure.analytics.purview.datamap.models.ContactInfo; +import com.azure.analytics.purview.datamap.models.EntityMutationResult; +import com.azure.analytics.purview.datamap.models.EntityStatus; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class EntityUpdate { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entitycreateorupdate.entityupdate + EntityMutationResult response + = entityClient.createOrUpdate(new AtlasEntityWithExtInfo().setReferredEntities(mapOf()) + .setEntity(new AtlasEntity() + .setAttributes(mapOf("owner", BinaryData.fromBytes("ExampleOwner".getBytes(StandardCharsets.UTF_8)), + "modifiedTime", BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "createTime", + BinaryData.fromBytes("0".getBytes(StandardCharsets.UTF_8)), "qualifiedName", + BinaryData.fromBytes("exampleaccount".getBytes(StandardCharsets.UTF_8)), "name", + BinaryData.fromBytes("ExampleStorageAccount".getBytes(StandardCharsets.UTF_8)), "description", + null, "publicAccessLevel", null)) + .setTypeName("azure_storage_account") + .setCreatedBy("ExampleCreator") + .setStatus(EntityStatus.ACTIVE) + .setUpdatedBy("ExampleUpdator") + .setVersion(0L) + .setContacts(mapOf("Expert", + Arrays.asList(new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df") + .setInfo("Example Expert Info")), + "Owner", Arrays.asList(new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df") + .setInfo("Example Owner Info"))))), + null, null); + // END:com.azure.analytics.purview.datamap.generated.entitycreateorupdate.entityupdate + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdateClassifications.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdateClassifications.java new file mode 100644 index 0000000000000..4350dc87f66c1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdateClassifications.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasClassification; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityUpdateClassifications { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityupdateclassifications.entityupdateclassifications + entityClient.updateClassifications("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24", + Arrays.asList( + new AtlasClassification().setTypeName("MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER") + .setEntityGuid("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24"), + new AtlasClassification().setTypeName("MICROSOFT.FINANCIAL.US_BANK_ACCOUNT_NUMBER") + .setEntityGuid("45dd4404-e897-b7e2-ca3c-f6e6b11b4f24"))); + // END:com.azure.analytics.purview.datamap.generated.entityupdateclassifications.entityupdateclassifications + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdateClassificationsByUniqueAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdateClassificationsByUniqueAttribute.java new file mode 100644 index 0000000000000..13022e134fdfe --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/EntityUpdateClassificationsByUniqueAttribute.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.EntityClient; +import com.azure.analytics.purview.datamap.models.AtlasClassification; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class EntityUpdateClassificationsByUniqueAttribute { + public static void main(String[] args) { + EntityClient entityClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildEntityClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.entityupdateclassificationsuniquebyattribute.entityupdateclassificationsbyuniqueattribute + entityClient.updateClassificationsUniqueByAttribute("azure_storage_account", + Arrays.asList(new AtlasClassification().setTypeName("MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER"), + new AtlasClassification().setTypeName("MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER")), + "https://exampleaccount.core.windows.net"); + // END:com.azure.analytics.purview.datamap.generated.entityupdateclassificationsuniquebyattribute.entityupdateclassificationsbyuniqueattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryAssignTermToEntities.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryAssignTermToEntities.java new file mode 100644 index 0000000000000..660b40132ff40 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryAssignTermToEntities.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasRelatedObjectId; +import com.azure.analytics.purview.datamap.models.AtlasStruct; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class GlossaryAssignTermToEntities { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossaryassigntermtoentities.glossaryassigntermtoentities + glossaryClient.assignTermToEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", + Arrays.asList(new AtlasRelatedObjectId().setGuid("ab9f1920-0b94-436d-aeb4-11a32c270fc0") + .setRelationshipAttributes(new AtlasStruct().setAttributes( + mapOf("expression", BinaryData.fromBytes("Example Expression".getBytes(StandardCharsets.UTF_8)), + "confidence", BinaryData.fromBytes("100".getBytes(StandardCharsets.UTF_8)), "description", + BinaryData.fromBytes("Example Description".getBytes(StandardCharsets.UTF_8)), "source", + BinaryData.fromBytes("ExampleSource".getBytes(StandardCharsets.UTF_8))))))); + // END:com.azure.analytics.purview.datamap.generated.glossaryassigntermtoentities.glossaryassigntermtoentities + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreate.java new file mode 100644 index 0000000000000..c6dbd54647a6a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreate.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossary; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GlossaryCreate { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarycreate.glossarycreate + AtlasGlossary response + = glossaryClient.create(new AtlasGlossary().setLongDescription("Example Long Description") + .setName("Glossary") + .setShortDescription("Example Short Description") + .setLanguage("en") + .setUsage("Example Glossary")); + // END:com.azure.analytics.purview.datamap.generated.glossarycreate.glossarycreate + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateCategories.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateCategories.java new file mode 100644 index 0000000000000..cf8422653520d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateCategories.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryCategory; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; +import java.util.List; + +public class GlossaryCreateCategories { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarycreatecategories.glossarycreatecategories + List response = glossaryClient.createCategories(Arrays.asList( + new AtlasGlossaryCategory().setName("ExampleCategory2") + .setAnchor(new AtlasGlossaryHeader().setGlossaryGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8")), + new AtlasGlossaryCategory().setName("ExampleCategory3") + .setAnchor(new AtlasGlossaryHeader().setGlossaryGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8")))); + // END:com.azure.analytics.purview.datamap.generated.glossarycreatecategories.glossarycreatecategories + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateCategory.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateCategory.java new file mode 100644 index 0000000000000..09bb13d7bd10a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateCategory.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryCategory; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryHeader; +import com.azure.analytics.purview.datamap.models.AtlasRelatedTermHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class GlossaryCreateCategory { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarycreatecategory.glossarycreatecategory + AtlasGlossaryCategory response = glossaryClient.createCategory(new AtlasGlossaryCategory() + .setName("ExampleCategory1") + .setAnchor(new AtlasGlossaryHeader().setGlossaryGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8")) + .setTerms(Arrays.asList(new AtlasRelatedTermHeader().setTermGuid("54688d39-b298-4104-9e80-f2a16f44aaea")))); + // END:com.azure.analytics.purview.datamap.generated.glossarycreatecategory.glossarycreatecategory + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTerm.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTerm.java new file mode 100644 index 0000000000000..11b09593d1c80 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTerm.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryHeader; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryTerm; +import com.azure.analytics.purview.datamap.models.ContactInfo; +import com.azure.analytics.purview.datamap.models.ResourceLink; +import com.azure.analytics.purview.datamap.models.TermStatus; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class GlossaryCreateTerm { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarycreateterm.glossarycreateterm + AtlasGlossaryTerm response = glossaryClient.createTerm(new AtlasGlossaryTerm() + .setLongDescription("Example Long Description") + .setName("ExampleTerm1") + .setShortDescription("Example Short Description") + .setAbbreviation("T1") + .setAnchor(new AtlasGlossaryHeader().setGlossaryGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8")) + .setStatus(TermStatus.APPROVED) + .setResources( + Arrays.asList(new ResourceLink().setDisplayName("Example Display Name").setUrl("Example Url"))) + .setContacts(mapOf("Expert", + Arrays.asList( + new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df").setInfo("Example Expert Info")), + "Steward", + Arrays.asList( + new ContactInfo().setId("30435ff9-9b96-44af-a5a9-e05c8b1ae2df").setInfo("Example Steward info")))), + null); + // END:com.azure.analytics.purview.datamap.generated.glossarycreateterm.glossarycreateterm + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTermWithTemplate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTermWithTemplate.java new file mode 100644 index 0000000000000..70b15680bc006 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTermWithTemplate.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryHeader; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryTerm; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class GlossaryCreateTermWithTemplate { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarycreateterm.glossarycreatetermwithtemplate + AtlasGlossaryTerm response = glossaryClient.createTerm( + new AtlasGlossaryTerm().setName("ExampleTerm") + .setAnchor(new AtlasGlossaryHeader().setGlossaryGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8")) + .setAttributes(mapOf("ExampleTermTemplateAttribute", + mapOf("plain string", BinaryData.fromBytes("Example String".getBytes(StandardCharsets.UTF_8)), + "date", BinaryData.fromBytes("1606233600000".getBytes(StandardCharsets.UTF_8)), "single choice", + BinaryData.fromBytes("Example Single Choice A".getBytes(StandardCharsets.UTF_8)), + "multi choice", + BinaryData.fromBytes( + "[Example Multi Choice A, Example Multi Choice B]".getBytes(StandardCharsets.UTF_8))))), + null); + // END:com.azure.analytics.purview.datamap.generated.glossarycreateterm.glossarycreatetermwithtemplate + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTerms.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTerms.java new file mode 100644 index 0000000000000..06c15acc97af5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryCreateTerms.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryHeader; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryTerm; +import com.azure.analytics.purview.datamap.models.ResourceLink; +import com.azure.analytics.purview.datamap.models.TermStatus; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; +import java.util.List; + +public class GlossaryCreateTerms { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarycreateterms.glossarycreateterms + List response + = glossaryClient + .createTerms( + Arrays.asList( + new AtlasGlossaryTerm().setLongDescription("Example Long Description") + .setName("ExampleTerm2") + .setShortDescription("Example Short Description") + .setAbbreviation("T2") + .setAnchor( + new AtlasGlossaryHeader().setGlossaryGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8")) + .setStatus(TermStatus.APPROVED) + .setResources(Arrays.asList( + new ResourceLink().setDisplayName("Example Display Name").setUrl("Example Url"))), + new AtlasGlossaryTerm().setLongDescription("Example Long Description") + .setName("ExampleTerm3") + .setShortDescription("Example Short Description") + .setAbbreviation("T3") + .setAnchor( + new AtlasGlossaryHeader().setGlossaryGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8")) + .setStatus(TermStatus.APPROVED) + .setResources(Arrays.asList( + new ResourceLink().setDisplayName("Example Display Name").setUrl("Example Url")))), + null); + // END:com.azure.analytics.purview.datamap.generated.glossarycreateterms.glossarycreateterms + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDelete.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDelete.java new file mode 100644 index 0000000000000..888ceb6242f67 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDelete.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GlossaryDelete { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarydelete.glossarydelete + glossaryClient.delete("c0c54153-13d1-1608-13af-43457cdffe75"); + // END:com.azure.analytics.purview.datamap.generated.glossarydelete.glossarydelete + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDeleteCategory.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDeleteCategory.java new file mode 100644 index 0000000000000..f0b96e7fb1ef5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDeleteCategory.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GlossaryDeleteCategory { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarydeletecategory.glossarydeletecategory + glossaryClient.deleteCategory("0e391355-252a-e5f3-ac18-5a3602df7616"); + // END:com.azure.analytics.purview.datamap.generated.glossarydeletecategory.glossarydeletecategory + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDeleteTerm.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDeleteTerm.java new file mode 100644 index 0000000000000..a5a2be7b89beb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryDeleteTerm.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GlossaryDeleteTerm { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarydeleteterm.glossarydeleteterm + glossaryClient.deleteTerm("b0942506-2d7d-1f45-d286-c29ca9e7f2ef"); + // END:com.azure.analytics.purview.datamap.generated.glossarydeleteterm.glossarydeleteterm + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGet.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGet.java new file mode 100644 index 0000000000000..4b823cf53cbb0 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGet.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossary; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GlossaryGet { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossaryget.glossaryget + AtlasGlossary response = glossaryClient.get("47029611-67a1-42d5-8766-90eb904f7f22"); + // END:com.azure.analytics.purview.datamap.generated.glossaryget.glossaryget + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetCategory.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetCategory.java new file mode 100644 index 0000000000000..0c2bdcface51f --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetCategory.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryCategory; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GlossaryGetCategory { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetcategory.glossarygetcategory + AtlasGlossaryCategory response = glossaryClient.getCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetcategory.glossarygetcategory + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetDetailed.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetDetailed.java new file mode 100644 index 0000000000000..cc06563d15fcc --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetDetailed.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryExtInfo; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GlossaryGetDetailed { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetdetailed.glossarygetdetailed + AtlasGlossaryExtInfo response = glossaryClient.getDetailed("c018ddaf-7c21-4b37-a838-dae5f110c3d8"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetdetailed.glossarygetdetailed + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetTerm.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetTerm.java new file mode 100644 index 0000000000000..44e2968a53228 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetTerm.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryTerm; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GlossaryGetTerm { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetterm.glossarygetterm + AtlasGlossaryTerm response = glossaryClient.getTerm("54688d39-b298-4104-9e80-f2a16f44aaea"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetterm.glossarygetterm + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetTermWithoutAssets.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetTermWithoutAssets.java new file mode 100644 index 0000000000000..35773a46b0e71 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryGetTermWithoutAssets.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryTerm; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class GlossaryGetTermWithoutAssets { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetterm.glossarygettermwithoutassets + AtlasGlossaryTerm response = glossaryClient.getTerm("54688d39-b298-4104-9e80-f2a16f44aaea"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetterm.glossarygettermwithoutassets + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryList.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryList.java new file mode 100644 index 0000000000000..da4a7b0c89e87 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryList.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossary; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GlossaryList { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarybatchget.glossarylist + List response = glossaryClient.batchGet(1, 0, "ASC", null); + // END:com.azure.analytics.purview.datamap.generated.glossarybatchget.glossarylist + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategories.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategories.java new file mode 100644 index 0000000000000..d82affa30fba8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategories.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryCategory; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GlossaryListCategories { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetcategories.glossarylistcategories + List response + = glossaryClient.getCategories("c018ddaf-7c21-4b37-a838-dae5f110c3d8", -1, 0, "ASC"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetcategories.glossarylistcategories + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategoriesHeaders.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategoriesHeaders.java new file mode 100644 index 0000000000000..83732bad32cf4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategoriesHeaders.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasRelatedCategoryHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GlossaryListCategoriesHeaders { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetcategoriesheaders.glossarylistcategoriesheaders + List response + = glossaryClient.getCategoriesHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8", -1, 0, "ASC"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetcategoriesheaders.glossarylistcategoriesheaders + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategoryTerms.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategoryTerms.java new file mode 100644 index 0000000000000..4d1b98bb44b53 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListCategoryTerms.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasRelatedTermHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GlossaryListCategoryTerms { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetcategoryterms.glossarylistcategoryterms + List response + = glossaryClient.getCategoryTerms("ed7458f0-9463-48a5-b5c6-4f785fb34e12", -1, 0, "ASC"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetcategoryterms.glossarylistcategoryterms + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListEntitiesAssignedWithTerm.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListEntitiesAssignedWithTerm.java new file mode 100644 index 0000000000000..7e7432f33f288 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListEntitiesAssignedWithTerm.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasRelatedObjectId; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GlossaryListEntitiesAssignedWithTerm { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetentitiesassignedwithterm.glossarylistentitiesassignedwithterm + List response + = glossaryClient.getEntitiesAssignedWithTerm("daf0ba4d-bc9a-4536-8a88-4b58e39dd3d4", -1, 0, "ASC"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetentitiesassignedwithterm.glossarylistentitiesassignedwithterm + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListRelatedCategories.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListRelatedCategories.java new file mode 100644 index 0000000000000..b01f938bf7793 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListRelatedCategories.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasRelatedCategoryHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; +import java.util.Map; + +public class GlossaryListRelatedCategories { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetrelatedcategories.glossarylistrelatedcategories + Map> response + = glossaryClient.getRelatedCategories("ed7458f0-9463-48a5-b5c6-4f785fb34e12", -1, 0, "ASC"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetrelatedcategories.glossarylistrelatedcategories + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListRelatedTerms.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListRelatedTerms.java new file mode 100644 index 0000000000000..c7652f83aeeed --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListRelatedTerms.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasRelatedTermHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; +import java.util.Map; + +public class GlossaryListRelatedTerms { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetrelatedterms.glossarylistrelatedterms + Map> response + = glossaryClient.getRelatedTerms("54688d39-b298-4104-9e80-f2a16f44aaea", -1, 0, "ASC"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetrelatedterms.glossarylistrelatedterms + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListTermHeaders.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListTermHeaders.java new file mode 100644 index 0000000000000..a869e5e40eb59 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListTermHeaders.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasRelatedTermHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GlossaryListTermHeaders { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygettermheaders.glossarylisttermheaders + List response + = glossaryClient.getTermHeaders("c018ddaf-7c21-4b37-a838-dae5f110c3d8", -1, 0, "ASC"); + // END:com.azure.analytics.purview.datamap.generated.glossarygettermheaders.glossarylisttermheaders + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListTerms.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListTerms.java new file mode 100644 index 0000000000000..5c733dea16d39 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryListTerms.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryTerm; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class GlossaryListTerms { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarygetterms.glossarylistterms + List response + = glossaryClient.getTerms("c018ddaf-7c21-4b37-a838-dae5f110c3d8", -1, 0, "ASC"); + // END:com.azure.analytics.purview.datamap.generated.glossarygetterms.glossarylistterms + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdate.java new file mode 100644 index 0000000000000..9f39426ca04d6 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdate.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossary; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.HashMap; +import java.util.Map; + +public class GlossaryPartialUpdate { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarypartialupdate.glossarypartialupdate + AtlasGlossary response = glossaryClient.partialUpdate("c018ddaf-7c21-4b37-a838-dae5f110c3d8", + mapOf("longDescription", "Example Long Description"), null); + // END:com.azure.analytics.purview.datamap.generated.glossarypartialupdate.glossarypartialupdate + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdateCategory.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdateCategory.java new file mode 100644 index 0000000000000..f847d9698f5f5 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdateCategory.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryCategory; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.HashMap; +import java.util.Map; + +public class GlossaryPartialUpdateCategory { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarypartialupdatecategory.glossarypartialupdatecategory + AtlasGlossaryCategory response = glossaryClient.partialUpdateCategory("3243ea0a-9492-47e1-392e-a84e64980af9", + mapOf("longDescription", "Example Long Description")); + // END:com.azure.analytics.purview.datamap.generated.glossarypartialupdatecategory.glossarypartialupdatecategory + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdateTerm.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdateTerm.java new file mode 100644 index 0000000000000..e74ce6cd58f10 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryPartialUpdateTerm.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryTerm; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.HashMap; +import java.util.Map; + +public class GlossaryPartialUpdateTerm { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarypartialupdateterm.glossarypartialupdateterm + AtlasGlossaryTerm response = glossaryClient.partialUpdateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", + mapOf("longDescription", "Example Long Description"), null); + // END:com.azure.analytics.purview.datamap.generated.glossarypartialupdateterm.glossarypartialupdateterm + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryRemoveTermAssignmentFromEntities.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryRemoveTermAssignmentFromEntities.java new file mode 100644 index 0000000000000..dc50344cec321 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryRemoveTermAssignmentFromEntities.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasRelatedObjectId; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class GlossaryRemoveTermAssignmentFromEntities { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossarydeletetermassignmentfromentities.glossaryremovetermassignmentfromentities + glossaryClient.deleteTermAssignmentFromEntities("8a7f65ec-6429-0b9b-3734-ec57bf1e34c2", + Arrays.asList(new AtlasRelatedObjectId().setGuid("16feb2a1-2c79-ade1-338d-fb24fcb8b8bd") + .setRelationshipGuid("624f08bb-3c93-4f03-9ce1-ed2ce2c7c8d5"))); + // END:com.azure.analytics.purview.datamap.generated.glossarydeletetermassignmentfromentities.glossaryremovetermassignmentfromentities + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdate.java new file mode 100644 index 0000000000000..2a30ab79f1885 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdate.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossary; +import com.azure.analytics.purview.datamap.models.AtlasRelatedCategoryHeader; +import com.azure.analytics.purview.datamap.models.AtlasRelatedTermHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class GlossaryUpdate { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossaryupdate.glossaryupdate + AtlasGlossary response = glossaryClient.update("c018ddaf-7c21-4b37-a838-dae5f110c3d8", + new AtlasGlossary().setGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8") + .setLongDescription("Example Long Description") + .setName("Glossary") + .setQualifiedName("Glossary") + .setShortDescription("Example Short Description") + .setLastModifiedTS("1") + .setCategories(Arrays.asList( + new AtlasRelatedCategoryHeader().setCategoryGuid("0d6766f6-f4b6-435b-bda2-d3edc358998e") + .setDisplayText("ExampleCategory3") + .setParentCategoryGuid("ed7458f0-9463-48a5-b5c6-4f785fb34e12") + .setRelationGuid("26a486a4-a8e2-483c-8a84-3b88e909f8d2"), + new AtlasRelatedCategoryHeader().setCategoryGuid("ed7458f0-9463-48a5-b5c6-4f785fb34e12") + .setDisplayText("ExampleCategory1") + .setParentCategoryGuid("e47c4584-daca-4f9e-9092-194e04692c9a") + .setRelationGuid("7bdcef93-a57a-4d1d-95ab-9d3036f394a0"), + new AtlasRelatedCategoryHeader().setCategoryGuid("e47c4584-daca-4f9e-9092-194e04692c9a") + .setDisplayText("ExampleCategory2") + .setRelationGuid("94071e56-fd3e-4441-93ff-1834f818482d"))) + .setLanguage("en") + .setTerms(Arrays.asList( + new AtlasRelatedTermHeader().setDisplayText("ExampleTerm1") + .setRelationGuid("7b6a8149-a928-476a-a068-dce58653cfa0") + .setTermGuid("54688d39-b298-4104-9e80-f2a16f44aaea"), + new AtlasRelatedTermHeader().setDisplayText("ExampleTerm2") + .setRelationGuid("9385640b-e6be-437d-a6b9-62d11c14a189") + .setTermGuid("952c7ba4-4c89-42d8-a05a-7d2161be7008"))) + .setUsage("Example Glossary"), + null); + // END:com.azure.analytics.purview.datamap.generated.glossaryupdate.glossaryupdate + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdateCategory.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdateCategory.java new file mode 100644 index 0000000000000..4013e0ba14316 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdateCategory.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryCategory; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryHeader; +import com.azure.analytics.purview.datamap.models.AtlasRelatedCategoryHeader; +import com.azure.analytics.purview.datamap.models.AtlasRelatedTermHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class GlossaryUpdateCategory { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossaryupdatecategory.glossaryupdatecategory + AtlasGlossaryCategory response = glossaryClient.updateCategory("ed7458f0-9463-48a5-b5c6-4f785fb34e12", + new AtlasGlossaryCategory().setGuid("ed7458f0-9463-48a5-b5c6-4f785fb34e12") + .setName("ExampleCategory1") + .setQualifiedName("ExampleCategory1@Glossary") + .setLastModifiedTS("1") + .setAnchor(new AtlasGlossaryHeader().setGlossaryGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8") + .setRelationGuid("7bdcef93-a57a-4d1d-95ab-9d3036f394a0")) + .setChildrenCategories(Arrays + .asList(new AtlasRelatedCategoryHeader().setCategoryGuid("0d6766f6-f4b6-435b-bda2-d3edc358998e"))) + .setParentCategory( + new AtlasRelatedCategoryHeader().setCategoryGuid("e47c4584-daca-4f9e-9092-194e04692c9a")) + .setTerms( + Arrays.asList(new AtlasRelatedTermHeader().setRelationGuid("6aebf5ac-0c83-40c0-98bf-958fe9c99007") + .setTermGuid("54688d39-b298-4104-9e80-f2a16f44aaea")))); + // END:com.azure.analytics.purview.datamap.generated.glossaryupdatecategory.glossaryupdatecategory + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdateTerm.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdateTerm.java new file mode 100644 index 0000000000000..62f13da376479 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/GlossaryUpdateTerm.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.GlossaryClient; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryHeader; +import com.azure.analytics.purview.datamap.models.AtlasGlossaryTerm; +import com.azure.analytics.purview.datamap.models.AtlasRelatedTermHeader; +import com.azure.analytics.purview.datamap.models.ResourceLink; +import com.azure.analytics.purview.datamap.models.TermStatus; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class GlossaryUpdateTerm { + public static void main(String[] args) { + GlossaryClient glossaryClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildGlossaryClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.glossaryupdateterm.glossaryupdateterm + AtlasGlossaryTerm response = glossaryClient.updateTerm("54688d39-b298-4104-9e80-f2a16f44aaea", + new AtlasGlossaryTerm().setGuid("54688d39-b298-4104-9e80-f2a16f44aaea") + .setName("ExampleTerm1") + .setQualifiedName("ExampleTerm1@Glossary") + .setShortDescription("Example Short Description") + .setLastModifiedTS("1") + .setAbbreviation("T1") + .setAnchor(new AtlasGlossaryHeader().setGlossaryGuid("c018ddaf-7c21-4b37-a838-dae5f110c3d8") + .setRelationGuid("7b6a8149-a928-476a-a068-dce58653cfa0")) + .setStatus(TermStatus.APPROVED) + .setResources( + Arrays.asList(new ResourceLink().setDisplayName("Example Display Name").setUrl("Example Url"))) + .setSeeAlso( + Arrays.asList(new AtlasRelatedTermHeader().setTermGuid("952c7ba4-4c89-42d8-a05a-7d2161be7008"), + new AtlasRelatedTermHeader().setTermGuid("821beef0-ced9-47ba-8f7f-c4f3459f4d18"))) + .setSynonyms( + Arrays.asList(new AtlasRelatedTermHeader().setTermGuid("952c7ba4-4c89-42d8-a05a-7d2161be7008"), + new AtlasRelatedTermHeader().setTermGuid("821beef0-ced9-47ba-8f7f-c4f3459f4d18"))), + null); + // END:com.azure.analytics.purview.datamap.generated.glossaryupdateterm.glossaryupdateterm + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGet.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGet.java new file mode 100644 index 0000000000000..61c06ee18c51b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGet.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.LineageClient; +import com.azure.analytics.purview.datamap.models.AtlasLineageInfo; +import com.azure.analytics.purview.datamap.models.LineageDirection; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class LineageGet { + public static void main(String[] args) { + LineageClient lineageClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildLineageClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.lineageget.lineageget + AtlasLineageInfo response + = lineageClient.get("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.INPUT, 1); + // END:com.azure.analytics.purview.datamap.generated.lineageget.lineageget + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGetByUniqueAttribute.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGetByUniqueAttribute.java new file mode 100644 index 0000000000000..d43de8e41affe --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGetByUniqueAttribute.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.LineageClient; +import com.azure.analytics.purview.datamap.models.AtlasLineageInfo; +import com.azure.analytics.purview.datamap.models.LineageDirection; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class LineageGetByUniqueAttribute { + public static void main(String[] args) { + LineageClient lineageClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildLineageClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.lineagegetbyuniqueattribute.lineagegetbyuniqueattribute + AtlasLineageInfo response = lineageClient.getByUniqueAttribute("azure_blob_path", LineageDirection.BOTH, 2, + "https://02cab97b-ba87-4675-972d-150b6cb522d3/entity.json/"); + // END:com.azure.analytics.purview.datamap.generated.lineagegetbyuniqueattribute.lineagegetbyuniqueattribute + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGetNextPage.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGetNextPage.java new file mode 100644 index 0000000000000..d80ea6bd30dee --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/LineageGetNextPage.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.LineageClient; +import com.azure.analytics.purview.datamap.models.AtlasLineageInfo; +import com.azure.analytics.purview.datamap.models.LineageDirection; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class LineageGetNextPage { + public static void main(String[] args) { + LineageClient lineageClient = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildLineageClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.lineagegetnextpage.lineagegetnextpage + AtlasLineageInfo response + = lineageClient.getNextPage("a6894eb3-81f3-829b-2adc-52f3e603411a", LineageDirection.INPUT, 0, 5); + // END:com.azure.analytics.purview.datamap.generated.lineagegetnextpage.lineagegetnextpage + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipCreate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipCreate.java new file mode 100644 index 0000000000000..b864f4d86f66c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipCreate.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.RelationshipClient; +import com.azure.analytics.purview.datamap.models.AtlasObjectId; +import com.azure.analytics.purview.datamap.models.AtlasRelationship; +import com.azure.analytics.purview.datamap.models.StatusAtlasRelationship; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class RelationshipCreate { + public static void main(String[] args) { + RelationshipClient relationshipClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildRelationshipClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.relationshipcreate.relationshipcreate + AtlasRelationship response = relationshipClient.create(new AtlasRelationship() + .setAttributes( + mapOf("expression", BinaryData.fromBytes("Example Expression".getBytes(StandardCharsets.UTF_8)), + "steward", BinaryData.fromBytes("Example Steward".getBytes(StandardCharsets.UTF_8)), "description", + BinaryData.fromBytes("Example Description".getBytes(StandardCharsets.UTF_8)), "source", null, + "status", null)) + .setTypeName("AtlasGlossarySynonym") + .setCreatedBy("ExampleCreator") + .setEnd1( + new AtlasObjectId().setGuid("856d31e6-e342-a1ce-6273-22ddb77029c6").setTypeName("AtlasGlossaryTerm")) + .setEnd2( + new AtlasObjectId().setGuid("77481037-2874-9bdc-9b9e-76bb94ee71aa").setTypeName("AtlasGlossaryTerm")) + .setLabel("r:AtlasGlossarySynonym") + .setStatus(StatusAtlasRelationship.ACTIVE) + .setUpdatedBy("ExampleUpdator") + .setVersion(0L)); + // END:com.azure.analytics.purview.datamap.generated.relationshipcreate.relationshipcreate + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipDelete.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipDelete.java new file mode 100644 index 0000000000000..f64f83922f09c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipDelete.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.RelationshipClient; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class RelationshipDelete { + public static void main(String[] args) { + RelationshipClient relationshipClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildRelationshipClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.relationshipdelete.relationshipdelete + relationshipClient.delete("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb"); + // END:com.azure.analytics.purview.datamap.generated.relationshipdelete.relationshipdelete + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipGet.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipGet.java new file mode 100644 index 0000000000000..55372b56c8cfb --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipGet.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.RelationshipClient; +import com.azure.analytics.purview.datamap.models.AtlasRelationshipWithExtInfo; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class RelationshipGet { + public static void main(String[] args) { + RelationshipClient relationshipClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildRelationshipClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.relationshipget.relationshipget + AtlasRelationshipWithExtInfo response = relationshipClient.get("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", false); + // END:com.azure.analytics.purview.datamap.generated.relationshipget.relationshipget + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipUpdate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipUpdate.java new file mode 100644 index 0000000000000..1c13a4c375662 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/RelationshipUpdate.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.RelationshipClient; +import com.azure.analytics.purview.datamap.models.AtlasObjectId; +import com.azure.analytics.purview.datamap.models.AtlasRelationship; +import com.azure.analytics.purview.datamap.models.StatusAtlasRelationship; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +public class RelationshipUpdate { + public static void main(String[] args) { + RelationshipClient relationshipClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildRelationshipClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.relationshipupdate.relationshipupdate + AtlasRelationship response = relationshipClient.update(new AtlasRelationship() + .setAttributes( + mapOf("expression", BinaryData.fromBytes("Example Expression".getBytes(StandardCharsets.UTF_8)), + "steward", BinaryData.fromBytes("Example Steward".getBytes(StandardCharsets.UTF_8)), "description", + BinaryData.fromBytes("Example Description".getBytes(StandardCharsets.UTF_8)), "source", null, + "status", null)) + .setTypeName("AtlasGlossarySynonym") + .setCreatedBy("ExampleCreator") + .setEnd1( + new AtlasObjectId().setGuid("77481037-2874-9bdc-9b9e-76bb94ee71aa").setTypeName("AtlasGlossaryTerm")) + .setEnd2( + new AtlasObjectId().setGuid("b0942506-2d7d-1f45-d286-c29ca9e7f2ef").setTypeName("AtlasGlossaryTerm")) + .setGuid("b2810301-293f-493f-88f1-7ac8784fb1fd") + .setLabel("r:AtlasGlossarySynonym") + .setStatus(StatusAtlasRelationship.ACTIVE) + .setUpdatedBy("ExampleUpdator") + .setVersion(0L)); + // END:com.azure.analytics.purview.datamap.generated.relationshipupdate.relationshipupdate + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkCreate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkCreate.java new file mode 100644 index 0000000000000..d3766c8bc75ee --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkCreate.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasAttributeDef; +import com.azure.analytics.purview.datamap.models.AtlasEntityDef; +import com.azure.analytics.purview.datamap.models.AtlasTypesDef; +import com.azure.analytics.purview.datamap.models.CardinalityValue; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class TypeBulkCreate { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitionbatchcreate.typebulkcreate + AtlasTypesDef response + = typeDefinitionClient.batchCreate(new AtlasTypesDef().setClassificationDefs(Arrays.asList()) + .setEntityDefs(Arrays.asList(new AtlasEntityDef().setName("azure_sql_server_example") + .setTypeVersion("1.0") + .setAttributeDefs(Arrays.asList(new AtlasAttributeDef().setCardinality(CardinalityValue.SET) + .setIsIndexable(false) + .setIsOptional(true) + .setIsUnique(false) + .setName("databases") + .setTypeName("array"))) + .setSuperTypes(Arrays.asList("azure_resource")))) + .setEnumDefs(Arrays.asList()) + .setRelationshipDefs(Arrays.asList()) + .setStructDefs(Arrays.asList())); + // END:com.azure.analytics.purview.datamap.generated.typedefinitionbatchcreate.typebulkcreate + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkCreateBusinessMetadataDefs.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkCreateBusinessMetadataDefs.java new file mode 100644 index 0000000000000..603cba2ef2e5b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkCreateBusinessMetadataDefs.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasAttributeDef; +import com.azure.analytics.purview.datamap.models.AtlasBusinessMetadataDef; +import com.azure.analytics.purview.datamap.models.AtlasTypesDef; +import com.azure.analytics.purview.datamap.models.CardinalityValue; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class TypeBulkCreateBusinessMetadataDefs { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitionbatchcreate.typebulkcreatebusinessmetadatadefs + AtlasTypesDef response = typeDefinitionClient.batchCreate(new AtlasTypesDef() + .setBusinessMetadataDefs(Arrays.asList(new AtlasBusinessMetadataDef().setDescription("") + .setName("myBizMetadata1") + .setAttributeDefs(Arrays.asList(new AtlasAttributeDef().setCardinality(CardinalityValue.SINGLE) + .setIsIndexable(true) + .setIsOptional(true) + .setIsUnique(false) + .setName("bizAttr1") + .setOptions(mapOf("maxStrLength", "50", "applicableEntityTypes", "[\"Path\"]")) + .setTypeName("string"))))) + .setClassificationDefs(Arrays.asList()) + .setEntityDefs(Arrays.asList()) + .setEnumDefs(Arrays.asList()) + .setRelationshipDefs(Arrays.asList()) + .setStructDefs(Arrays.asList())); + // END:com.azure.analytics.purview.datamap.generated.typedefinitionbatchcreate.typebulkcreatebusinessmetadatadefs + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkDelete.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkDelete.java new file mode 100644 index 0000000000000..496dd2b4b8419 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkDelete.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasAttributeDef; +import com.azure.analytics.purview.datamap.models.AtlasEntityDef; +import com.azure.analytics.purview.datamap.models.AtlasTypesDef; +import com.azure.analytics.purview.datamap.models.CardinalityValue; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.Arrays; + +public class TypeBulkDelete { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitionbatchdelete.typebulkdelete + typeDefinitionClient.batchDelete(new AtlasTypesDef().setClassificationDefs(Arrays.asList()) + .setEntityDefs(Arrays.asList(new AtlasEntityDef().setName("azure_sql_server_example") + .setTypeVersion("1.0") + .setAttributeDefs(Arrays.asList(new AtlasAttributeDef().setCardinality(CardinalityValue.SET) + .setIsIndexable(false) + .setIsOptional(true) + .setIsUnique(false) + .setName("databases") + .setTypeName("array"))) + .setSuperTypes(Arrays.asList("azure_resource")))) + .setEnumDefs(Arrays.asList()) + .setRelationshipDefs(Arrays.asList()) + .setStructDefs(Arrays.asList())); + // END:com.azure.analytics.purview.datamap.generated.typedefinitionbatchdelete.typebulkdelete + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkUpdate.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkUpdate.java new file mode 100644 index 0000000000000..6a3b05d8c3170 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeBulkUpdate.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasAttributeDef; +import com.azure.analytics.purview.datamap.models.AtlasConstraintDef; +import com.azure.analytics.purview.datamap.models.AtlasEntityDef; +import com.azure.analytics.purview.datamap.models.AtlasRelationshipDef; +import com.azure.analytics.purview.datamap.models.AtlasRelationshipEndDef; +import com.azure.analytics.purview.datamap.models.AtlasTypesDef; +import com.azure.analytics.purview.datamap.models.CardinalityValue; +import com.azure.analytics.purview.datamap.models.RelationshipCategory; +import com.azure.core.util.BinaryData; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class TypeBulkUpdate { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitionbatchupdate.typebulkupdate + AtlasTypesDef response + = typeDefinitionClient + .batchUpdate( + new AtlasTypesDef().setClassificationDefs(Arrays.asList()) + .setEntityDefs( + Arrays + .asList( + new AtlasEntityDef().setName("azure_sql_server") + .setTypeVersion("1.0") + .setAttributeDefs( + Arrays.asList(new AtlasAttributeDef().setCardinality(CardinalityValue.SET) + .setIsIndexable(false) + .setIsOptional(true) + .setIsUnique(false) + .setName("databases") + .setTypeName("array"))) + .setSuperTypes(Arrays.asList("azure_resource")), + new AtlasEntityDef().setName("azure_sql_db") + .setTypeVersion("1.0") + .setAttributeDefs( + Arrays + .asList( + new AtlasAttributeDef().setCardinality(CardinalityValue.SINGLE) + .setConstraints( + Arrays + .asList(new AtlasConstraintDef() + .setParams(mapOf("attribute", + BinaryData.fromBytes("databases" + .getBytes(StandardCharsets.UTF_8)))) + .setType("inverseRef"))) + .setIsIndexable(false) + .setIsOptional(false) + .setIsUnique(false) + .setName("server") + .setTypeName("azure_sql_server"), + new AtlasAttributeDef().setCardinality(CardinalityValue.SET) + .setIsIndexable(false) + .setIsOptional(true) + .setIsUnique(false) + .setName("schemas") + .setTypeName("array"), + new AtlasAttributeDef().setCardinality(CardinalityValue.SINGLE) + .setIsIndexable(false) + .setIsOptional(true) + .setIsUnique(false) + .setName("collation") + .setTypeName("string"), + new AtlasAttributeDef().setCardinality(CardinalityValue.SINGLE) + .setIsIndexable(false) + .setIsOptional(true) + .setIsUnique(false) + .setName("compatibilityLevel") + .setTypeName("int"))) + .setSuperTypes(Arrays.asList("azure_resource")))) + .setEnumDefs(Arrays.asList()) + .setRelationshipDefs(Arrays.asList( + new AtlasRelationshipDef().setName("azure_sql_server_databases") + .setTypeVersion("1.0") + .setEndDef1(new AtlasRelationshipEndDef().setCardinality(CardinalityValue.SET) + .setIsContainer(true) + .setIsLegacyAttribute(true) + .setName("databases") + .setType("azure_sql_server")) + .setEndDef2(new AtlasRelationshipEndDef().setCardinality(CardinalityValue.SINGLE) + .setIsContainer(false) + .setIsLegacyAttribute(true) + .setName("server") + .setType("azure_sql_db")) + .setRelationshipCategory(RelationshipCategory.COMPOSITION), + new AtlasRelationshipDef().setName("azure_sql_db_schemas") + .setTypeVersion("1.0") + .setEndDef1(new AtlasRelationshipEndDef().setCardinality(CardinalityValue.SET) + .setIsContainer(true) + .setIsLegacyAttribute(true) + .setName("schemas") + .setType("azure_sql_db")) + .setEndDef2(new AtlasRelationshipEndDef().setCardinality(CardinalityValue.SINGLE) + .setIsContainer(false) + .setIsLegacyAttribute(true) + .setName("db") + .setType("azure_sql_schema")) + .setRelationshipCategory(RelationshipCategory.COMPOSITION))) + .setStructDefs(Arrays.asList())); + // END:com.azure.analytics.purview.datamap.generated.typedefinitionbatchupdate.typebulkupdate + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeDelete.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeDelete.java new file mode 100644 index 0000000000000..8b24282420f78 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeDelete.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeDelete { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiondelete.typedelete + typeDefinitionClient.delete("hive_order"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiondelete.typedelete + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetBusinessMetadataDefByGuid.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetBusinessMetadataDefByGuid.java new file mode 100644 index 0000000000000..8fba05d5d389c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetBusinessMetadataDefByGuid.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasBusinessMetadataDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetBusinessMetadataDefByGuid { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetbusinessmetadatabyid.typegetbusinessmetadatadefbyguid + AtlasBusinessMetadataDef response + = typeDefinitionClient.getBusinessMetadataById("d8757510-c866-61ba-486f-1afca09f43b8"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetbusinessmetadatabyid.typegetbusinessmetadatadefbyguid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetBusinessMetadataDefByName.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetBusinessMetadataDefByName.java new file mode 100644 index 0000000000000..103dee8ff15f8 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetBusinessMetadataDefByName.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasBusinessMetadataDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetBusinessMetadataDefByName { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetbusinessmetadatabyname.typegetbusinessmetadatadefbyname + AtlasBusinessMetadataDef response + = typeDefinitionClient.getBusinessMetadataByName("Business_Metadata_Type_Name"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetbusinessmetadatabyname.typegetbusinessmetadatadefbyname + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetByGuid.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetByGuid.java new file mode 100644 index 0000000000000..183ef4579d8f4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetByGuid.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasTypeDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetByGuid { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetbyid.typegetbyguid + AtlasTypeDef response = typeDefinitionClient.getById("0ddc2fcf-ad17-4d06-984a-ffb2ffb2a941"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetbyid.typegetbyguid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetByName.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetByName.java new file mode 100644 index 0000000000000..af0bb55ec0d69 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetByName.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasTypeDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetByName { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetbyname.typegetbyname + AtlasTypeDef response = typeDefinitionClient.getByName("glossary_term_status_value"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetbyname.typegetbyname + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetClassificationDefByGuid.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetClassificationDefByGuid.java new file mode 100644 index 0000000000000..0fc25c2496203 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetClassificationDefByGuid.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasClassificationDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetClassificationDefByGuid { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetclassificationbyid.typegetclassificationdefbyguid + AtlasClassificationDef response + = typeDefinitionClient.getClassificationById("e79878fa-adba-4ee5-adc5-328d8841cd49"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetclassificationbyid.typegetclassificationdefbyguid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetClassificationDefByName.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetClassificationDefByName.java new file mode 100644 index 0000000000000..7cd2f9848a894 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetClassificationDefByName.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasClassificationDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetClassificationDefByName { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetclassificationbyname.typegetclassificationdefbyname + AtlasClassificationDef response + = typeDefinitionClient.getClassificationByName("MICROSOFT.GOVERNMENT.CANADA.SOCIAL_INSURANCE_NUMBER"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetclassificationbyname.typegetclassificationdefbyname + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEntityDefByGuid.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEntityDefByGuid.java new file mode 100644 index 0000000000000..8bb8bea8dc801 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEntityDefByGuid.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasEntityDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetEntityDefByGuid { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetentitybyid.typegetentitydefbyguid + AtlasEntityDef response = typeDefinitionClient.getEntityById("4bc54c37-98a8-4de8-9ee8-182610859d43"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetentitybyid.typegetentitydefbyguid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEntityDefByName.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEntityDefByName.java new file mode 100644 index 0000000000000..d5aff73c6bded --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEntityDefByName.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasEntityDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetEntityDefByName { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetentitybyname.typegetentitydefbyname + AtlasEntityDef response = typeDefinitionClient.getEntityByName("DataSet"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetentitybyname.typegetentitydefbyname + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEnumDefByGuid.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEnumDefByGuid.java new file mode 100644 index 0000000000000..02bbc8bb66fa7 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEnumDefByGuid.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasEnumDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetEnumDefByGuid { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetenumbyid.typegetenumdefbyguid + AtlasEnumDef response = typeDefinitionClient.getEnumById("644ab9c7-893a-4a4d-8e0a-591a6556d1a0"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetenumbyid.typegetenumdefbyguid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEnumDefByName.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEnumDefByName.java new file mode 100644 index 0000000000000..447328f57c3a3 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetEnumDefByName.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasEnumDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetEnumDefByName { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetenumbyname.typegetenumdefbyname + AtlasEnumDef response = typeDefinitionClient.getEnumByName("hive_principal_type"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetenumbyname.typegetenumdefbyname + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetRelationshipDefByGuid.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetRelationshipDefByGuid.java new file mode 100644 index 0000000000000..ad6ab7cfa65f1 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetRelationshipDefByGuid.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasRelationshipDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetRelationshipDefByGuid { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetrelationshipbyid.typegetrelationshipdefbyguid + AtlasRelationshipDef response + = typeDefinitionClient.getRelationshipById("695edde1-2782-4a3c-841b-0b3aba25fe45"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetrelationshipbyid.typegetrelationshipdefbyguid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetRelationshipDefByName.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetRelationshipDefByName.java new file mode 100644 index 0000000000000..fe56eac0eee7d --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetRelationshipDefByName.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasRelationshipDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetRelationshipDefByName { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetrelationshipbyname.typegetrelationshipdefbyname + AtlasRelationshipDef response = typeDefinitionClient.getRelationshipByName("storm_topology_nodes"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetrelationshipbyname.typegetrelationshipdefbyname + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetStructDefByGuid.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetStructDefByGuid.java new file mode 100644 index 0000000000000..28fc227930624 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetStructDefByGuid.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasStructDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetStructDefByGuid { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetstructbyid.typegetstructdefbyguid + AtlasStructDef response = typeDefinitionClient.getStructById("f1571b6e-ad08-4040-a9a7-c30ed935d437"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetstructbyid.typegetstructdefbyguid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetStructDefByName.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetStructDefByName.java new file mode 100644 index 0000000000000..906ca838bff50 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetStructDefByName.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasStructDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetStructDefByName { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetstructbyname.typegetstructdefbyname + AtlasStructDef response = typeDefinitionClient.getStructByName("hive_order"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetstructbyname.typegetstructdefbyname + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetTermTemplateDefByGuid.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetTermTemplateDefByGuid.java new file mode 100644 index 0000000000000..8f5f28ecd6be4 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetTermTemplateDefByGuid.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.TermTemplateDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetTermTemplateDefByGuid { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongettermtemplatebyid.typegettermtemplatedefbyguid + TermTemplateDef response = typeDefinitionClient.getTermTemplateById("d776af9c-985c-4168-abb2-477523dbfc70"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongettermtemplatebyid.typegettermtemplatedefbyguid + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetTermTemplateDefByName.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetTermTemplateDefByName.java new file mode 100644 index 0000000000000..d6dae28bbc6bf --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeGetTermTemplateDefByName.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.TermTemplateDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeGetTermTemplateDefByName { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongettermtemplatebyname.typegettermtemplatedefbyname + TermTemplateDef response = typeDefinitionClient.getTermTemplateByName("MS KPI"); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongettermtemplatebyname.typegettermtemplatedefbyname + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeList.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeList.java new file mode 100644 index 0000000000000..9a5146562ea6a --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeList.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasTypesDef; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeList { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitionget.typelist + AtlasTypesDef response = typeDefinitionClient.get(true, null); + // END:com.azure.analytics.purview.datamap.generated.typedefinitionget.typelist + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListEnumDefs.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListEnumDefs.java new file mode 100644 index 0000000000000..450a1187cae4b --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListEnumDefs.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasTypesDef; +import com.azure.analytics.purview.datamap.models.TypeCategory; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeListEnumDefs { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitionget.typelistenumdefs + AtlasTypesDef response = typeDefinitionClient.get(null, TypeCategory.ENUM); + // END:com.azure.analytics.purview.datamap.generated.typedefinitionget.typelistenumdefs + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListHeaders.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListHeaders.java new file mode 100644 index 0000000000000..9242b2dc28848 --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListHeaders.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasTypeDefHeader; +import com.azure.identity.DefaultAzureCredentialBuilder; +import java.util.List; + +public class TypeListHeaders { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitiongetheaders.typelistheaders + List response = typeDefinitionClient.getHeaders(true, null); + // END:com.azure.analytics.purview.datamap.generated.typedefinitiongetheaders.typelistheaders + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListTermTemplateDefs.java b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListTermTemplateDefs.java new file mode 100644 index 0000000000000..f629b001d9a1c --- /dev/null +++ b/sdk/purview/azure-analytics-purview-datamap/src/samples/java/com/azure/analytics/purview/datamap/generated/TypeListTermTemplateDefs.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.analytics.purview.datamap.generated; + +import com.azure.analytics.purview.datamap.DataMapClientBuilder; +import com.azure.analytics.purview.datamap.TypeDefinitionClient; +import com.azure.analytics.purview.datamap.models.AtlasTypesDef; +import com.azure.analytics.purview.datamap.models.TypeCategory; +import com.azure.identity.DefaultAzureCredentialBuilder; + +public class TypeListTermTemplateDefs { + public static void main(String[] args) { + TypeDefinitionClient typeDefinitionClient + = new DataMapClientBuilder().credential(new DefaultAzureCredentialBuilder().build()) + .endpoint("{Endpoint}") + .buildTypeDefinitionClient(); + // BEGIN:com.azure.analytics.purview.datamap.generated.typedefinitionget.typelisttermtemplatedefs + AtlasTypesDef response = typeDefinitionClient.get(null, TypeCategory.TERM_TEMPLATE); + // END:com.azure.analytics.purview.datamap.generated.typedefinitionget.typelisttermtemplatedefs + } +} diff --git a/sdk/purview/azure-analytics-purview-datamap/tsp-location.yaml b/sdk/purview/azure-analytics-purview-datamap/tsp-location.yaml index 78d985837d24a..21b7d32606f67 100644 --- a/sdk/purview/azure-analytics-purview-datamap/tsp-location.yaml +++ b/sdk/purview/azure-analytics-purview-datamap/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/purview/Azure.Analytics.Purview.DataMap -commit: d85dc63616d14d9790b224d46aad024e3461955b +commit: aa9a17bbde9fcab9214172381c6000bc91763c0a repo: Azure/azure-rest-api-specs +additionalDirectories: