From f2fb835b6cd0453eedcc646e9e986f31dc6bdbba Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 6 Feb 2024 02:03:50 +0000 Subject: [PATCH] CodeGen from PR 26702 in Azure/azure-rest-api-specs Merge fabf9af9267a54c271da1c76f0841a7c4d44ce18 into f984ae525c5eaffa551075b27d87925f9f73c2d0 --- .../Azure.Analytics.Purview.DataMap.sln | 56 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../Azure.Analytics.Purview.DataMap/README.md | 86 + .../Azure.Analytics.Purview.DataMap.csproj | 20 + ...csPurviewDataMapClientBuilderExtensions.cs | 35 + .../AnalyticsPurviewDataMapModelFactory.cs | 512 + .../AtlasAttributeDef.Serialization.cs | 328 + .../src/Generated/AtlasAttributeDef.cs | 116 + .../AtlasBusinessMetadataDef.Serialization.cs | 342 + .../src/Generated/AtlasBusinessMetadataDef.cs | 124 + .../AtlasClassification.Serialization.cs | 261 + .../src/Generated/AtlasClassification.cs | 130 + .../AtlasClassificationDef.Serialization.cs | 417 + .../src/Generated/AtlasClassificationDef.cs | 185 + .../AtlasClassifications.Serialization.cs | 243 + .../src/Generated/AtlasClassifications.cs | 116 + .../AtlasConstraintDef.Serialization.cs | 184 + .../src/Generated/AtlasConstraintDef.cs | 100 + .../AtlasDateFormat.Serialization.cs | 273 + .../src/Generated/AtlasDateFormat.cs | 99 + .../AtlasEntitiesWithExtInfo.Serialization.cs | 179 + .../src/Generated/AtlasEntitiesWithExtInfo.cs | 75 + .../Generated/AtlasEntity.Serialization.cs | 594 ++ .../src/Generated/AtlasEntity.cs | 251 + .../Generated/AtlasEntityDef.Serialization.cs | 417 + .../src/Generated/AtlasEntityDef.cs | 139 + .../AtlasEntityHeader.Serialization.cs | 372 + .../src/Generated/AtlasEntityHeader.cs | 151 + .../AtlasEntityHeaders.Serialization.cs | 154 + .../src/Generated/AtlasEntityHeaders.cs | 67 + .../AtlasEntityWithExtInfo.Serialization.cs | 169 + .../src/Generated/AtlasEntityWithExtInfo.cs | 74 + .../Generated/AtlasEnumDef.Serialization.cs | 353 + .../src/Generated/AtlasEnumDef.cs | 128 + .../AtlasEnumElementDef.Serialization.cs | 165 + .../src/Generated/AtlasEnumElementDef.cs | 73 + .../Generated/AtlasGlossary.Serialization.cs | 343 + .../src/Generated/AtlasGlossary.cs | 125 + .../AtlasGlossaryCategory.Serialization.cs | 351 + .../src/Generated/AtlasGlossaryCategory.cs | 125 + .../AtlasGlossaryExtInfo.Serialization.cs | 395 + .../src/Generated/AtlasGlossaryExtInfo.cs | 135 + .../AtlasGlossaryHeader.Serialization.cs | 161 + .../src/Generated/AtlasGlossaryHeader.cs | 73 + .../AtlasGlossaryTerm.Serialization.cs | 944 ++ .../src/Generated/AtlasGlossaryTerm.cs | 269 + .../AtlasLineageInfo.Serialization.cs | 343 + .../src/Generated/AtlasLineageInfo.cs | 102 + .../AtlasNumberFormat.Serialization.cs | 344 + .../src/Generated/AtlasNumberFormat.cs | 119 + .../Generated/AtlasObjectId.Serialization.cs | 195 + .../src/Generated/AtlasObjectId.cs | 104 + ...tlasRelatedCategoryHeader.Serialization.cs | 183 + .../Generated/AtlasRelatedCategoryHeader.cs | 81 + .../AtlasRelatedObjectId.Serialization.cs | 277 + .../src/Generated/AtlasRelatedObjectId.cs | 143 + .../AtlasRelatedTermHeader.Serialization.cs | 209 + .../src/Generated/AtlasRelatedTermHeader.cs | 89 + .../AtlasRelationship.Serialization.cs | 355 + .../src/Generated/AtlasRelationship.cs | 152 + ...sRelationshipAttributeDef.Serialization.cs | 354 + .../AtlasRelationshipAttributeDef.cs | 129 + .../AtlasRelationshipDef.Serialization.cs | 398 + .../src/Generated/AtlasRelationshipDef.cs | 217 + .../AtlasRelationshipEndDef.Serialization.cs | 206 + .../src/Generated/AtlasRelationshipEndDef.cs | 90 + ...asRelationshipWithExtInfo.Serialization.cs | 169 + .../Generated/AtlasRelationshipWithExtInfo.cs | 71 + .../src/Generated/AtlasSortType.cs | 54 + .../Generated/AtlasStruct.Serialization.cs | 195 + .../src/Generated/AtlasStruct.cs | 107 + .../Generated/AtlasStructDef.Serialization.cs | 342 + .../src/Generated/AtlasStructDef.cs | 124 + ...AtlasTermAssignmentHeader.Serialization.cs | 243 + .../Generated/AtlasTermAssignmentHeader.cs | 97 + .../Generated/AtlasTermAssignmentStatus.cs | 66 + ...sTermCategorizationHeader.Serialization.cs | 195 + .../AtlasTermCategorizationHeader.cs | 81 + .../Generated/AtlasTermRelationshipStatus.cs | 60 + .../Generated/AtlasTimeZone.Serialization.cs | 220 + .../src/Generated/AtlasTimeZone.cs | 87 + .../Generated/AtlasTypeDef.Serialization.cs | 534 + .../src/Generated/AtlasTypeDef.cs | 257 + .../AtlasTypeDefHeader.Serialization.cs | 165 + .../src/Generated/AtlasTypeDefHeader.cs | 73 + .../Generated/AtlasTypesDef.Serialization.cs | 303 + .../src/Generated/AtlasTypesDef.cs | 97 + .../AutoCompleteConfig.Serialization.cs | 176 + .../src/Generated/AutoCompleteConfig.cs | 114 + .../AutoCompleteResult.Serialization.cs | 153 + .../src/Generated/AutoCompleteResult.cs | 67 + .../AutoCompleteResultValue.Serialization.cs | 150 + .../src/Generated/AutoCompleteResultValue.cs | 69 + .../BulkImportResult.Serialization.cs | 178 + .../src/Generated/BulkImportResult.cs | 72 + .../BusinessAttributeUpdateBehavior.cs | 54 + .../src/Generated/CardinalityValue.cs | 54 + ...sificationAssociateConfig.Serialization.cs | 168 + .../ClassificationAssociateConfig.cs | 77 + .../Generated/ContactInfo.Serialization.cs | 150 + .../src/Generated/ContactInfo.cs | 69 + .../ContactSearchResultValue.Serialization.cs | 161 + .../src/Generated/ContactSearchResultValue.cs | 79 + .../src/Generated/DataMapClient.cs | 109 + .../src/Generated/DataMapClientOptions.cs | 37 + .../src/Generated/Discovery.cs | 442 + .../src/Generated/Docs/Discovery.xml | 593 ++ .../src/Generated/Docs/Entity.xml | 6613 ++++++++++++ .../src/Generated/Docs/Glossary.xml | 9047 ++++++++++++++++ .../src/Generated/Docs/Lineage.xml | 503 + .../src/Generated/Docs/Relationship.xml | 715 ++ .../src/Generated/Docs/TypeDefinition.xml | 8929 ++++++++++++++++ .../src/Generated/Entity.cs | 5489 ++++++++++ .../EntityMutationResult.Serialization.cs | 227 + .../src/Generated/EntityMutationResult.cs | 77 + .../src/Generated/EntityStatus.cs | 51 + .../src/Generated/Glossary.cs | 4384 ++++++++ ...rtBusinessMetadataRequest.Serialization.cs | 136 + .../ImportBusinessMetadataRequest.cs | 91 + .../src/Generated/ImportInfo.Serialization.cs | 176 + .../src/Generated/ImportInfo.cs | 77 + .../src/Generated/ImportStatus.cs | 51 + .../src/Generated/Lineage.cs | 581 + .../src/Generated/LineageDirection.cs | 54 + .../LineageRelation.Serialization.cs | 161 + .../src/Generated/LineageRelation.cs | 73 + .../MoveEntitiesConfig.Serialization.cs | 153 + .../src/Generated/MoveEntitiesConfig.cs | 67 + .../Generated/ParentRelation.Serialization.cs | 161 + .../src/Generated/ParentRelation.cs | 73 + .../PurviewObjectId.Serialization.cs | 284 + .../src/Generated/PurviewObjectId.cs | 154 + .../Generated/QueryConfig.Serialization.cs | 271 + .../src/Generated/QueryConfig.cs | 162 + .../Generated/QueryResult.Serialization.cs | 209 + .../src/Generated/QueryResult.cs | 97 + .../src/Generated/Relationship.cs | 534 + .../src/Generated/RelationshipCategory.cs | 54 + .../Generated/ResourceLink.Serialization.cs | 150 + .../src/Generated/ResourceLink.cs | 69 + .../src/Generated/RoundingMode.cs | 69 + .../SearchFacetItem.Serialization.cs | 169 + .../src/Generated/SearchFacetItem.cs | 73 + .../SearchFacetItemValue.Serialization.cs | 154 + .../src/Generated/SearchFacetItemValue.cs | 69 + .../SearchFacetResultValue.Serialization.cs | 378 + .../src/Generated/SearchFacetResultValue.cs | 116 + .../SearchFacetSort.Serialization.cs | 158 + .../src/Generated/SearchFacetSort.cs | 69 + .../SearchHighlights.Serialization.cs | 253 + .../src/Generated/SearchHighlights.cs | 92 + .../SearchResultValue.Serialization.cs | 470 + .../src/Generated/SearchResultValue.cs | 184 + .../src/Generated/SearchSortOrder.cs | 51 + .../SearchTaxonomySetting.Serialization.cs | 168 + .../src/Generated/SearchTaxonomySetting.cs | 71 + .../src/Generated/StatusAtlasRelationship.cs | 51 + .../Generated/SuggestConfig.Serialization.cs | 176 + .../src/Generated/SuggestConfig.cs | 118 + .../Generated/SuggestResult.Serialization.cs | 153 + .../src/Generated/SuggestResult.cs | 67 + .../SuggestResultValue.Serialization.cs | 466 + .../src/Generated/SuggestResultValue.cs | 180 + .../TermSearchResultValue.Serialization.cs | 161 + .../src/Generated/TermSearchResultValue.cs | 73 + .../src/Generated/TermStatus.cs | 57 + .../TermTemplateDef.Serialization.cs | 342 + .../src/Generated/TermTemplateDef.cs | 124 + .../Generated/TimeBoundary.Serialization.cs | 161 + .../src/Generated/TimeBoundary.cs | 73 + .../src/Generated/TypeCategory.cs | 75 + .../src/Generated/TypeDefinition.cs | 2842 +++++ .../src/Properties/AssemblyInfo.cs | 11 + ...ure.Analytics.Purview.DataMap.Tests.csproj | 20 + .../Generated/Samples/Samples_Discovery.cs | 645 ++ .../tests/Generated/Samples/Samples_Entity.cs | 7038 ++++++++++++ .../Generated/Samples/Samples_Glossary.cs | 9394 +++++++++++++++++ .../Generated/Samples/Samples_Lineage.cs | 555 + .../Generated/Samples/Samples_Relationship.cs | 773 ++ .../Samples/Samples_TypeDefinition.cs | 9204 ++++++++++++++++ .../tsp-location.yaml | 5 + 182 files changed, 95709 insertions(+) create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/Azure.Analytics.Purview.DataMap.sln create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/CHANGELOG.md create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/Directory.Build.props create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/README.md create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Azure.Analytics.Purview.DataMap.csproj create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapClientBuilderExtensions.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapModelFactory.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasAttributeDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasAttributeDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasBusinessMetadataDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasBusinessMetadataDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassification.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassification.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassificationDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassificationDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassifications.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassifications.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasConstraintDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasConstraintDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasDateFormat.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasDateFormat.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntity.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntity.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeader.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeader.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumElementDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumElementDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryCategory.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryCategory.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryExtInfo.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryExtInfo.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryHeader.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryHeader.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryTerm.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryTerm.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasLineageInfo.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasLineageInfo.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasNumberFormat.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasNumberFormat.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasObjectId.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasObjectId.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedCategoryHeader.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedCategoryHeader.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedObjectId.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedObjectId.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedTermHeader.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedTermHeader.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipAttributeDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipAttributeDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipEndDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipEndDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipWithExtInfo.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipWithExtInfo.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasSortType.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStruct.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStruct.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStructDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStructDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentHeader.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentHeader.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentStatus.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermCategorizationHeader.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermCategorizationHeader.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermRelationshipStatus.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTimeZone.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTimeZone.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDefHeader.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDefHeader.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResult.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResult.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResultValue.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResultValue.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BulkImportResult.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BulkImportResult.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BusinessAttributeUpdateBehavior.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/CardinalityValue.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactInfo.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactInfo.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactSearchResultValue.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactSearchResultValue.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/DataMapClient.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/DataMapClientOptions.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Lineage.xml create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityMutationResult.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityMutationResult.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityStatus.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportBusinessMetadataRequest.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportBusinessMetadataRequest.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportInfo.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportInfo.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportStatus.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageDirection.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageRelation.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageRelation.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ParentRelation.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ParentRelation.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/PurviewObjectId.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/PurviewObjectId.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryResult.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryResult.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/RelationshipCategory.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ResourceLink.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ResourceLink.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/RoundingMode.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItem.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItem.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItemValue.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItemValue.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetResultValue.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetResultValue.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetSort.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetSort.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchHighlights.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchHighlights.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchResultValue.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchResultValue.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchSortOrder.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchTaxonomySetting.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchTaxonomySetting.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/StatusAtlasRelationship.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResult.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResult.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResultValue.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResultValue.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermSearchResultValue.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermSearchResultValue.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermStatus.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermTemplateDef.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermTemplateDef.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TimeBoundary.Serialization.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TimeBoundary.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeCategory.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/src/Properties/AssemblyInfo.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/tests/Azure.Analytics.Purview.DataMap.Tests.csproj create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Lineage.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_TypeDefinition.cs create mode 100644 sdk/purview/Azure.Analytics.Purview.DataMap/tsp-location.yaml diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/Azure.Analytics.Purview.DataMap.sln b/sdk/purview/Azure.Analytics.Purview.DataMap/Azure.Analytics.Purview.DataMap.sln new file mode 100644 index 0000000000000..0d89c175ed5e1 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/Azure.Analytics.Purview.DataMap.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Analytics.Purview.DataMap", "src\Azure.Analytics.Purview.DataMap.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Analytics.Purview.DataMap.Tests", "tests\Azure.Analytics.Purview.DataMap.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/CHANGELOG.md b/sdk/purview/Azure.Analytics.Purview.DataMap/CHANGELOG.md new file mode 100644 index 0000000000000..13dd08af78abe --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/Directory.Build.props b/sdk/purview/Azure.Analytics.Purview.DataMap/Directory.Build.props new file mode 100644 index 0000000000000..63bd836ad44b7 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/README.md b/sdk/purview/Azure.Analytics.Purview.DataMap/README.md new file mode 100644 index 0000000000000..7444377620460 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/README.md @@ -0,0 +1,86 @@ +# Azure.Analytics.Purview.DataMap client library for .NET + +Azure.Analytics.Purview.DataMap is a managed service that helps developers get secret simply and securely. + +Use the client library for to: + +* [Get secret](https://docs.microsoft.com/azure) + +[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples] + + [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/purview/Azure.Analytics.Purview.DataMap/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure) + +## Getting started + +This section should include everything a developer needs to do to install and create their first client connection *very quickly*. + +### Install the package + +First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository. + +Install the client library for .NET with [NuGet](https://www.nuget.org/ ): + +```dotnetcli +dotnet add package Azure.Analytics.Purview.DataMap --prerelease +``` + +### Prerequisites + +Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB: + +> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. + +### Authenticate the client + +If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating. + +For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object. + +## Key concepts + +The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity. + +Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of: + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | +[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) + + +## Examples + +You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/purview/Azure.Analytics.Purview.DataMap/samples). + +## Troubleshooting + +Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery. + +Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API. + +If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code. + +## Next steps + +* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory. +* If appropriate, point users to other packages that might be useful. +* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for. + +## Contributing + +This is a template, but your SDK readme should include details on how to contribute code to the repo/package. + + +[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/purview/Azure.Analytics.Purview.DataMap/README.png) diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Azure.Analytics.Purview.DataMap.csproj b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Azure.Analytics.Purview.DataMap.csproj new file mode 100644 index 0000000000000..48b469f7284c3 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Azure.Analytics.Purview.DataMap.csproj @@ -0,0 +1,20 @@ + + + This is the Azure.Analytics.Purview.DataMap client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.Analytics.Purview.DataMap for Azure Data Plane + 1.0.0-beta.1 + Azure.Analytics.Purview.DataMap + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapClientBuilderExtensions.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapClientBuilderExtensions.cs new file mode 100644 index 0000000000000..2d6f5b66cd410 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapClientBuilderExtensions.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Analytics.Purview.DataMap; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class AnalyticsPurviewDataMapClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// The to use. + public static IAzureClientBuilder AddDataMapClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new DataMapClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddDataMapClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapModelFactory.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapModelFactory.cs new file mode 100644 index 0000000000000..8a1630dfdd92b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapModelFactory.cs @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Model factory for models. + public static partial class AnalyticsPurviewDataMapModelFactory + { + /// Initializes a new instance of . + /// The attributes of the struct. + /// The name of the type. + /// ETag for concurrency control. + /// Business attributes. + /// An array of classifications. + /// The created time of the record. + /// The user who created the record. + /// Custom Attribute. + /// The GUID of the entity. + /// The home ID of the entity. + /// The collection ID of the entity. + /// Whether it is a shell entity. + /// labels. + /// An array of term assignment headers indicating the meanings of the entity. + /// Used to record the provenance of an instance of an entity or relationship. + /// Determines if there's a proxy. + /// The attributes of relationship. + /// + /// Status of the entity - can be active or deleted. Deleted entities are not + /// removed. + /// + /// The update time of the record. + /// The user who updated the record. + /// The version of the entity. + /// The dictionary of contacts for entities. Key could be Expert or Owner. + /// A new instance for mocking. + public static AtlasEntity AtlasEntity(IDictionary attributes = null, string typeName = null, string lastModifiedTS = null, IDictionary businessAttributes = null, IEnumerable classifications = null, long? createTime = null, string createdBy = null, IDictionary customAttributes = null, string guid = null, string homeId = null, string collectionId = null, bool? isIncomplete = null, IEnumerable labels = null, IEnumerable meanings = null, int? provenanceType = null, bool? proxy = null, IDictionary relationshipAttributes = null, EntityStatus? status = null, long? updateTime = null, string updatedBy = null, long? version = null, IDictionary> contacts = null) + { + attributes ??= new Dictionary(); + businessAttributes ??= new Dictionary(); + classifications ??= new List(); + customAttributes ??= new Dictionary(); + labels ??= new List(); + meanings ??= new List(); + relationshipAttributes ??= new Dictionary(); + contacts ??= new Dictionary>(); + + return new AtlasEntity(attributes, typeName, lastModifiedTS, businessAttributes, classifications?.ToList(), createTime, createdBy, customAttributes, guid, homeId, collectionId, isIncomplete, labels?.ToList(), meanings?.ToList(), provenanceType, proxy, relationshipAttributes, status, updateTime, updatedBy, version, contacts, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A map of GUID assignments with entities. + /// The entity headers of mutated entities. + /// An array of entity headers that partially updated. + /// A new instance for mocking. + public static EntityMutationResult EntityMutationResult(IReadOnlyDictionary guidAssignments = null, IReadOnlyDictionary> mutatedEntities = null, IEnumerable partialUpdatedEntities = null) + { + guidAssignments ??= new Dictionary(); + mutatedEntities ??= new Dictionary>(); + partialUpdatedEntities ??= new List(); + + return new EntityMutationResult(guidAssignments, mutatedEntities, partialUpdatedEntities?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// An array of objects. + /// The size of the page. + /// The sorted by field. + /// to specify whether the result should be sorted? If yes, whether asc or desc. + /// The start index of the page. + /// The total count of items. + /// A new instance for mocking. + public static AtlasClassifications AtlasClassifications(IEnumerable list = null, int? pageSize = null, string sortBy = null, AtlasSortType? sortType = null, int? startIndex = null, int? totalCount = null) + { + list ??= new List(); + + return new AtlasClassifications(list?.ToList(), pageSize, sortBy, sortType, startIndex, totalCount, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// failed importInfoList. + /// successful importInfoList. + /// A new instance for mocking. + public static BulkImportResult BulkImportResult(IEnumerable failedImportInfoList = null, IEnumerable successImportInfoList = null) + { + failedImportInfoList ??= new List(); + successImportInfoList ??= new List(); + + return new BulkImportResult(failedImportInfoList?.ToList(), successImportInfoList?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// childObjectName. + /// importStatus. + /// parentObjectName. + /// remarks. + /// A new instance for mocking. + public static ImportInfo ImportInfo(string childObjectName = null, ImportStatus? importStatus = null, string parentObjectName = null, string remarks = null) + { + return new ImportInfo(childObjectName, importStatus, parentObjectName, remarks, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The GUID of the object. + /// An array of classifications. + /// The long version description. + /// The name of the glossary object. + /// The qualified name of the glossary object. + /// The short version of description. + /// ETag for concurrency control. + /// The created time of the record. + /// The user who created the record. + /// The update time of the record. + /// The user who updated the record. + /// An array of categories. + /// The language of the glossary. + /// An array of related term headers. + /// The usage of the glossary. + /// The glossary category information. + /// The glossary term information. + /// A new instance for mocking. + public static AtlasGlossaryExtInfo AtlasGlossaryExtInfo(string guid = null, IEnumerable classifications = null, string longDescription = null, string name = null, string qualifiedName = null, string shortDescription = null, string lastModifiedTS = null, long? createTime = null, string createdBy = null, long? updateTime = null, string updatedBy = null, IEnumerable categories = null, string language = null, IEnumerable terms = null, string usage = null, IReadOnlyDictionary categoryInfo = null, IReadOnlyDictionary termInfo = null) + { + classifications ??= new List(); + categories ??= new List(); + terms ??= new List(); + categoryInfo ??= new Dictionary(); + termInfo ??= new Dictionary(); + + return new AtlasGlossaryExtInfo(guid, classifications?.ToList(), longDescription, name, qualifiedName, shortDescription, lastModifiedTS, createTime, createdBy, updateTime, updatedBy, categories?.ToList(), language, terms?.ToList(), usage, categoryInfo, termInfo, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The total number of search results (not the number of documents in a single + /// page). + /// + /// 'True' if the '@search.count' is an approximate value and vise versa. + /// The token used to get next batch of data. Absent if there's no more data. + /// + /// A facet list that consists of index fields assetType ,classification, + /// contactId, and label. When the facet is specified in the request, the value of + /// the facet is returned as an element of @search.facets. + /// + /// Search result value. + /// A new instance for mocking. + public static QueryResult QueryResult(int? searchCount = null, bool? searchCountApproximate = null, string continuationToken = null, SearchFacetResultValue searchFacets = null, IEnumerable value = null) + { + value ??= new List(); + + return new QueryResult(searchCount, searchCountApproximate, continuationToken, searchFacets, value?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Entity type. + /// Asset type. + /// Classification. + /// Term. + /// Contact id. + /// Contact type. + /// Label. + /// Glossary type. + /// Term status. + /// Term template. + /// A new instance for mocking. + public static SearchFacetResultValue SearchFacetResultValue(IEnumerable entityType = null, IEnumerable assetType = null, IEnumerable classification = null, IEnumerable term = null, IEnumerable contactId = null, IEnumerable contactType = null, IEnumerable label = null, IEnumerable glossaryType = null, IEnumerable termStatus = null, IEnumerable termTemplate = null) + { + entityType ??= new List(); + assetType ??= new List(); + classification ??= new List(); + term ??= new List(); + contactId ??= new List(); + contactType ??= new List(); + label ??= new List(); + glossaryType ??= new List(); + termStatus ??= new List(); + termTemplate ??= new List(); + + return new SearchFacetResultValue(entityType?.ToList(), assetType?.ToList(), classification?.ToList(), term?.ToList(), contactId?.ToList(), contactType?.ToList(), label?.ToList(), glossaryType?.ToList(), termStatus?.ToList(), termTemplate?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The count of the facet item. + /// The name of the facet item. + /// A new instance for mocking. + public static SearchFacetItemValue SearchFacetItemValue(int? count = null, string value = null) + { + return new SearchFacetItemValue(count, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The search score calculated by the search engine. The results are ordered by + /// search score by default. + /// + /// + /// A highlight list that consists of index fields id ,qualifiedName, name, + /// description, entityType. When the keyword appears in those fields, the value of + /// the field, attached with emphasis mark, is returned as an element of + /// @search.highlights. + /// + /// + /// The object type of the record. Object type is the top-level property to + /// distinguish whether a record is an asset or a term. + /// + /// The create time of the record. The Unix epoch format. + /// The last update time of the record. The Unix epoch format. + /// The GUID of the record. + /// The name of the record. + /// The qualified name of the record. + /// The type name of the asset. + /// The description of the asset. + /// The endorsement of the asset. + /// The owner of the record. + /// The classifications of the record. + /// The labels of the asset. + /// The terms assigned to the asset. + /// The contacts of the asset. + /// The asset types of the asset. + /// + /// The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or + /// AtlasGlossaryCategory. + /// + /// The glossary name of the term. + /// The status of the term. + /// The term template names used by the term. + /// The definition of the term. + /// A new instance for mocking. + public static SearchResultValue SearchResultValue(float? searchScore = null, SearchHighlights searchHighlights = null, string objectType = null, long? createTime = null, long? updateTime = null, string id = null, string name = null, string qualifiedName = null, string entityType = null, string description = null, string endorsement = null, string owner = null, IEnumerable classification = null, IEnumerable label = null, IEnumerable term = null, IEnumerable contact = null, IEnumerable assetType = null, string glossaryType = null, string glossary = null, string termStatus = null, IEnumerable termTemplate = null, string longDescription = null) + { + classification ??= new List(); + label ??= new List(); + term ??= new List(); + contact ??= new List(); + assetType ??= new List(); + termTemplate ??= new List(); + + return new SearchResultValue(searchScore, searchHighlights, objectType, createTime, updateTime, id, name, qualifiedName, entityType, description, endorsement, owner, classification?.ToList(), label?.ToList(), term?.ToList(), contact?.ToList(), assetType?.ToList(), glossaryType, glossary, termStatus, termTemplate?.ToList(), longDescription, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Id. + /// Qualified name. + /// Name. + /// Description. + /// Entity type. + /// A new instance for mocking. + public static SearchHighlights SearchHighlights(IEnumerable id = null, IEnumerable qualifiedName = null, IEnumerable name = null, IEnumerable description = null, IEnumerable entityType = null) + { + id ??= new List(); + qualifiedName ??= new List(); + name ??= new List(); + description ??= new List(); + entityType ??= new List(); + + return new SearchHighlights(id?.ToList(), qualifiedName?.ToList(), name?.ToList(), description?.ToList(), entityType?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the term. + /// The name of the glossary which contains the term. + /// The GUID of the term. + /// A new instance for mocking. + public static TermSearchResultValue TermSearchResultValue(string name = null, string glossaryName = null, string guid = null) + { + return new TermSearchResultValue(name, glossaryName, guid, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The GUID of the contact. + /// The description of the contact. + /// + /// The type of the contact. It can be Expert or Owner for an entity. It can be + /// Expert or Steward for a glossary term. + /// + /// A new instance for mocking. + public static ContactSearchResultValue ContactSearchResultValue(string id = null, string info = null, string contactType = null) + { + return new ContactSearchResultValue(id, info, contactType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The result value. + /// A new instance for mocking. + public static SuggestResult SuggestResult(IEnumerable value = null) + { + value ??= new List(); + + return new SuggestResult(value?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The search score calculated by the search engine. The results are ordered by + /// search score by default. + /// + /// + /// The target text that contains the keyword as prefix. The keyword is wrapped + /// with emphasis mark. + /// + /// + /// The object type of the record. Object type is the top-level property to + /// distinguish whether a record is an asset or a term. + /// + /// The create time of the record. The Unix epoch format. + /// The last update time of the record. The Unix epoch format. + /// The GUID of the record. + /// The name of the record. + /// The qualified name of the record. + /// The type name of the asset. + /// The description of the asset. + /// The endorsement of the asset. + /// The owner of the record. + /// The classifications of the record. + /// The labels of the asset. + /// The terms assigned to the asset. + /// The contacts of the asset. + /// The asset types of the asset. + /// + /// The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or + /// AtlasGlossaryCategory. + /// + /// The glossary name of the term. + /// The status of the term. + /// The term template names used by the term. + /// The definition of the term. + /// A new instance for mocking. + public static SuggestResultValue SuggestResultValue(float? searchScore = null, string searchText = null, string objectType = null, long? createTime = null, long? updateTime = null, string id = null, string name = null, string qualifiedName = null, string entityType = null, string description = null, string endorsement = null, string owner = null, IEnumerable classification = null, IEnumerable label = null, IEnumerable term = null, IEnumerable contact = null, IEnumerable assetType = null, string glossaryType = null, string glossary = null, string termStatus = null, IEnumerable termTemplate = null, string longDescription = null) + { + classification ??= new List(); + label ??= new List(); + term ??= new List(); + contact ??= new List(); + assetType ??= new List(); + termTemplate ??= new List(); + + return new SuggestResultValue(searchScore, searchText, objectType, createTime, updateTime, id, name, qualifiedName, entityType, description, endorsement, owner, classification?.ToList(), label?.ToList(), term?.ToList(), contact?.ToList(), assetType?.ToList(), glossaryType, glossary, termStatus, termTemplate?.ToList(), longDescription, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The result value. + /// A new instance for mocking. + public static AutoCompleteResult AutoCompleteResult(IEnumerable value = null) + { + value ??= new List(); + + return new AutoCompleteResult(value?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The completed term or phrase. + /// The completed search query text. + /// A new instance for mocking. + public static AutoCompleteResultValue AutoCompleteResultValue(string text = null, string queryPlusText = null) + { + return new AutoCompleteResultValue(text, queryPlusText, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The GUID of the base entity. + /// The GUID entity map. + /// The entity count in specific direction. + /// The depth of lineage. + /// The width of lineage. + /// The number of children node. + /// The enum of lineage direction. + /// An array of parentRelations relations. + /// An array of lineage relations. + /// A new instance for mocking. + public static AtlasLineageInfo AtlasLineageInfo(string baseEntityGuid = null, IReadOnlyDictionary guidEntityMap = null, IReadOnlyDictionary> widthCounts = null, int? lineageDepth = null, int? lineageWidth = null, int? childrenCount = null, LineageDirection? lineageDirection = null, IEnumerable parentRelations = null, IEnumerable relations = null) + { + guidEntityMap ??= new Dictionary(); + widthCounts ??= new Dictionary>(); + parentRelations ??= new List(); + relations ??= new List(); + + return new AtlasLineageInfo(baseEntityGuid, guidEntityMap, widthCounts, lineageDepth, lineageWidth, childrenCount, lineageDirection, parentRelations?.ToList(), relations?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The GUID of child entity. + /// The GUID of relationship. + /// The GUID of parent entity. + /// A new instance for mocking. + public static ParentRelation ParentRelation(string childEntityId = null, string relationshipId = null, string parentEntityId = null) + { + return new ParentRelation(childEntityId, relationshipId, parentEntityId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The GUID of from-entity. + /// The GUID of relationship. + /// The GUID of to-entity. + /// A new instance for mocking. + public static LineageRelation LineageRelation(string fromEntityId = null, string relationshipId = null, string toEntityId = null) + { + return new LineageRelation(fromEntityId, relationshipId, toEntityId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The referred entity header. + /// Atlas relationship instance. + /// A new instance for mocking. + public static AtlasRelationshipWithExtInfo AtlasRelationshipWithExtInfo(IReadOnlyDictionary referredEntities = null, AtlasRelationship relationship = null) + { + referredEntities ??= new Dictionary(); + + return new AtlasRelationshipWithExtInfo(referredEntities, relationship, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The created time of the record. + /// The user who created the record. + /// The date format. + /// The description of the type definition. + /// The GUID of the type definition. + /// The name of the type definition. + /// The options for the type definition. + /// The service type. + /// The version of the type. + /// The update time of the record. + /// The user who updated the record. + /// The version of the record. + /// ETag for concurrency control. + /// + /// Specifying a list of entityType names in the classificationDef, ensures that + /// classifications can + /// only be applied to those entityTypes. + /// + /// Any subtypes of the entity types inherit the restriction. + /// + /// Any classificationDef subtypes inherit the parents entityTypes restrictions. + /// + /// Any classificationDef subtypes can further restrict the parents entityTypes + /// restrictions by specifying a subset of the entityTypes. + /// + /// An empty entityTypes list when there are no parent restrictions means there are no + /// restrictions. + /// + /// An empty entityTypes list when there are parent + /// restrictions means that the subtype picks up the parents + /// restrictions. + /// + /// If a list of entityTypes are supplied, where one inherits + /// from another, this will be rejected. This should encourage cleaner + /// classificationsDefs. + /// + /// + /// An array of sub types. + /// An array of super types. + /// An array of relationship attributes. + /// The default value. + /// An array of enum element definitions. + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + /// + /// The Relationship category determines the style of relationship around + /// containment and lifecycle. + /// UML terminology is used for the values. + /// + /// ASSOCIATION is a relationship with no containment. + /// COMPOSITION and AGGREGATION are containment relationships. + /// + /// The difference being in the lifecycles of the container and its children. + /// In the COMPOSITION case, the children cannot exist without the container. + /// For AGGREGATION, the life cycles of the container and children are totally independent. + /// + /// The label of the relationship. + /// An array of attribute definitions. + /// A new instance for mocking. + public static AtlasTypeDef AtlasTypeDef(TypeCategory? category = null, long? createTime = null, string createdBy = null, AtlasDateFormat dateFormatter = null, string description = null, string guid = null, string name = null, IReadOnlyDictionary options = null, string serviceType = null, string typeVersion = null, long? updateTime = null, string updatedBy = null, long? version = null, string lastModifiedTS = null, IEnumerable entityTypes = null, IEnumerable subTypes = null, IEnumerable superTypes = null, IEnumerable relationshipAttributeDefs = null, string defaultValue = null, IEnumerable elementDefs = null, AtlasRelationshipEndDef endDef1 = null, AtlasRelationshipEndDef endDef2 = null, RelationshipCategory? relationshipCategory = null, string relationshipLabel = null, IEnumerable attributeDefs = null) + { + options ??= new Dictionary(); + entityTypes ??= new List(); + subTypes ??= new List(); + superTypes ??= new List(); + relationshipAttributeDefs ??= new List(); + elementDefs ??= new List(); + attributeDefs ??= new List(); + + return new AtlasTypeDef(category, createTime, createdBy, dateFormatter, description, guid, name, options, serviceType, typeVersion, updateTime, updatedBy, version, lastModifiedTS, entityTypes?.ToList(), subTypes?.ToList(), superTypes?.ToList(), relationshipAttributeDefs?.ToList(), defaultValue, elementDefs?.ToList(), endDef1, endDef2, relationshipCategory, relationshipLabel, attributeDefs?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The GUID of the type definition. + /// The name of the type definition. + /// A new instance for mocking. + public static AtlasTypeDefHeader AtlasTypeDefHeader(TypeCategory? category = null, string guid = null, string name = null) + { + return new AtlasTypeDefHeader(category, guid, name, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasAttributeDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasAttributeDef.Serialization.cs new file mode 100644 index 0000000000000..8eae40695781f --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasAttributeDef.Serialization.cs @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasAttributeDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasAttributeDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Cardinality)) + { + writer.WritePropertyName("cardinality"u8); + writer.WriteStringValue(Cardinality.Value.ToString()); + } + if (Optional.IsCollectionDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteStartArray(); + foreach (var item in Constraints) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DefaultValue)) + { + writer.WritePropertyName("defaultValue"u8); + writer.WriteStringValue(DefaultValue); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(IncludeInNotification)) + { + writer.WritePropertyName("includeInNotification"u8); + writer.WriteBooleanValue(IncludeInNotification.Value); + } + if (Optional.IsDefined(IsIndexable)) + { + writer.WritePropertyName("isIndexable"u8); + writer.WriteBooleanValue(IsIndexable.Value); + } + if (Optional.IsDefined(IsOptional)) + { + writer.WritePropertyName("isOptional"u8); + writer.WriteBooleanValue(IsOptional.Value); + } + if (Optional.IsDefined(IsUnique)) + { + writer.WritePropertyName("isUnique"u8); + writer.WriteBooleanValue(IsUnique.Value); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsDefined(ValuesMaxCount)) + { + writer.WritePropertyName("valuesMaxCount"u8); + writer.WriteNumberValue(ValuesMaxCount.Value); + } + if (Optional.IsDefined(ValuesMinCount)) + { + writer.WritePropertyName("valuesMinCount"u8); + writer.WriteNumberValue(ValuesMinCount.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasAttributeDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasAttributeDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasAttributeDef(document.RootElement, options); + } + + internal static AtlasAttributeDef DeserializeAtlasAttributeDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional cardinality = default; + Optional> constraints = default; + Optional defaultValue = default; + Optional description = default; + Optional includeInNotification = default; + Optional isIndexable = default; + Optional isOptional = default; + Optional isUnique = default; + Optional name = default; + Optional> options0 = default; + Optional typeName = default; + Optional valuesMaxCount = default; + Optional valuesMinCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cardinality"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cardinality = new CardinalityValue(property.Value.GetString()); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasConstraintDef.DeserializeAtlasConstraintDef(item)); + } + constraints = array; + continue; + } + if (property.NameEquals("defaultValue"u8)) + { + defaultValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("includeInNotification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + includeInNotification = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isIndexable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isIndexable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isOptional"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isOptional = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isUnique"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isUnique = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("valuesMaxCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valuesMaxCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("valuesMinCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valuesMinCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasAttributeDef(Optional.ToNullable(cardinality), Optional.ToList(constraints), defaultValue.Value, description.Value, Optional.ToNullable(includeInNotification), Optional.ToNullable(isIndexable), Optional.ToNullable(isOptional), Optional.ToNullable(isUnique), name.Value, Optional.ToDictionary(options0), typeName.Value, Optional.ToNullable(valuesMaxCount), Optional.ToNullable(valuesMinCount), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasAttributeDef)} does not support '{options.Format}' format."); + } + } + + AtlasAttributeDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasAttributeDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasAttributeDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasAttributeDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasAttributeDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasAttributeDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasAttributeDef.cs new file mode 100644 index 0000000000000..6ab92f67c858f --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasAttributeDef.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// class that captures details of a struct-attribute. + public partial class AtlasAttributeDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasAttributeDef() + { + Constraints = new ChangeTrackingList(); + Options = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// single-valued attribute or multi-valued attribute. + /// An array of constraints. + /// The default value of the attribute. + /// The description of the attribute. + /// Determines if it is included in notification. + /// Determines if it is indexable. + /// Determines if it is optional. + /// Determines if it unique. + /// The name of the attribute. + /// The options for the attribute. + /// The name of the type. + /// The maximum count of the values. + /// The minimum count of the values. + /// Keeps track of any properties unknown to the library. + internal AtlasAttributeDef(CardinalityValue? cardinality, IList constraints, string defaultValue, string description, bool? includeInNotification, bool? isIndexable, bool? isOptional, bool? isUnique, string name, IDictionary options, string typeName, int? valuesMaxCount, int? valuesMinCount, IDictionary serializedAdditionalRawData) + { + Cardinality = cardinality; + Constraints = constraints; + DefaultValue = defaultValue; + Description = description; + IncludeInNotification = includeInNotification; + IsIndexable = isIndexable; + IsOptional = isOptional; + IsUnique = isUnique; + Name = name; + Options = options; + TypeName = typeName; + ValuesMaxCount = valuesMaxCount; + ValuesMinCount = valuesMinCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// single-valued attribute or multi-valued attribute. + public CardinalityValue? Cardinality { get; set; } + /// An array of constraints. + public IList Constraints { get; } + /// The default value of the attribute. + public string DefaultValue { get; set; } + /// The description of the attribute. + public string Description { get; set; } + /// Determines if it is included in notification. + public bool? IncludeInNotification { get; set; } + /// Determines if it is indexable. + public bool? IsIndexable { get; set; } + /// Determines if it is optional. + public bool? IsOptional { get; set; } + /// Determines if it unique. + public bool? IsUnique { get; set; } + /// The name of the attribute. + public string Name { get; set; } + /// The options for the attribute. + public IDictionary Options { get; } + /// The name of the type. + public string TypeName { get; set; } + /// The maximum count of the values. + public int? ValuesMaxCount { get; set; } + /// The minimum count of the values. + public int? ValuesMinCount { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasBusinessMetadataDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasBusinessMetadataDef.Serialization.cs new file mode 100644 index 0000000000000..f0c0573f079ca --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasBusinessMetadataDef.Serialization.cs @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasBusinessMetadataDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasBusinessMetadataDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(DateFormatter)) + { + writer.WritePropertyName("dateFormatter"u8); + writer.WriteObjectValue(DateFormatter); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ServiceType)) + { + writer.WritePropertyName("serviceType"u8); + writer.WriteStringValue(ServiceType); + } + if (Optional.IsDefined(TypeVersion)) + { + writer.WritePropertyName("typeVersion"u8); + writer.WriteStringValue(TypeVersion); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsCollectionDefined(AttributeDefs)) + { + writer.WritePropertyName("attributeDefs"u8); + writer.WriteStartArray(); + foreach (var item in AttributeDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasBusinessMetadataDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasBusinessMetadataDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasBusinessMetadataDef(document.RootElement, options); + } + + internal static AtlasBusinessMetadataDef DeserializeAtlasBusinessMetadataDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional createTime = default; + Optional createdBy = default; + Optional dateFormatter = default; + Optional description = default; + Optional guid = default; + Optional name = default; + Optional> options0 = default; + Optional serviceType = default; + Optional typeVersion = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + Optional lastModifiedTS = default; + Optional> attributeDefs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("dateFormatter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateFormatter = AtlasDateFormat.DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("serviceType"u8)) + { + serviceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeVersion"u8)) + { + typeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("attributeDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasAttributeDef.DeserializeAtlasAttributeDef(item)); + } + attributeDefs = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasBusinessMetadataDef(Optional.ToNullable(category), Optional.ToNullable(createTime), createdBy.Value, dateFormatter.Value, description.Value, guid.Value, name.Value, Optional.ToDictionary(options0), serviceType.Value, typeVersion.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), lastModifiedTS.Value, Optional.ToList(attributeDefs), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasBusinessMetadataDef)} does not support '{options.Format}' format."); + } + } + + AtlasBusinessMetadataDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasBusinessMetadataDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasBusinessMetadataDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasBusinessMetadataDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasBusinessMetadataDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasBusinessMetadataDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasBusinessMetadataDef.cs new file mode 100644 index 0000000000000..0d545dac3814f --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasBusinessMetadataDef.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// class that captures details of a struct-type. + public partial class AtlasBusinessMetadataDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasBusinessMetadataDef() + { + Options = new ChangeTrackingDictionary(); + AttributeDefs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The created time of the record. + /// The user who created the record. + /// The date format. + /// The description of the type definition. + /// The GUID of the type definition. + /// The name of the type definition. + /// The options for the type definition. + /// The service type. + /// The version of the type. + /// The update time of the record. + /// The user who updated the record. + /// The version of the record. + /// ETag for concurrency control. + /// An array of attribute definitions. + /// Keeps track of any properties unknown to the library. + internal AtlasBusinessMetadataDef(TypeCategory? category, long? createTime, string createdBy, AtlasDateFormat dateFormatter, string description, string guid, string name, IDictionary options, string serviceType, string typeVersion, long? updateTime, string updatedBy, long? version, string lastModifiedTS, IList attributeDefs, IDictionary serializedAdditionalRawData) + { + Category = category; + CreateTime = createTime; + CreatedBy = createdBy; + DateFormatter = dateFormatter; + Description = description; + Guid = guid; + Name = name; + Options = options; + ServiceType = serviceType; + TypeVersion = typeVersion; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + LastModifiedTS = lastModifiedTS; + AttributeDefs = attributeDefs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The enum of type category. + public TypeCategory? Category { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The date format. + public AtlasDateFormat DateFormatter { get; set; } + /// The description of the type definition. + public string Description { get; set; } + /// The GUID of the type definition. + public string Guid { get; set; } + /// The name of the type definition. + public string Name { get; set; } + /// The options for the type definition. + public IDictionary Options { get; } + /// The service type. + public string ServiceType { get; set; } + /// The version of the type. + public string TypeVersion { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The version of the record. + public long? Version { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// An array of attribute definitions. + public IList AttributeDefs { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassification.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassification.Serialization.cs new file mode 100644 index 0000000000000..4b6b4d842f169 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassification.Serialization.cs @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasClassification : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasClassification)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartObject(); + foreach (var item in Attributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsDefined(EntityGuid)) + { + writer.WritePropertyName("entityGuid"u8); + writer.WriteStringValue(EntityGuid); + } + if (Optional.IsDefined(EntityStatus)) + { + writer.WritePropertyName("entityStatus"u8); + writer.WriteStringValue(EntityStatus.Value.ToString()); + } + if (Optional.IsDefined(RemovePropagationsOnEntityDelete)) + { + writer.WritePropertyName("removePropagationsOnEntityDelete"u8); + writer.WriteBooleanValue(RemovePropagationsOnEntityDelete.Value); + } + if (Optional.IsCollectionDefined(ValidityPeriods)) + { + writer.WritePropertyName("validityPeriods"u8); + writer.WriteStartArray(); + foreach (var item in ValidityPeriods) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasClassification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasClassification)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasClassification(document.RootElement, options); + } + + internal static AtlasClassification DeserializeAtlasClassification(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> attributes = default; + Optional typeName = default; + Optional lastModifiedTS = default; + Optional entityGuid = default; + Optional entityStatus = default; + Optional removePropagationsOnEntityDelete = default; + Optional> validityPeriods = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + attributes = dictionary; + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityGuid"u8)) + { + entityGuid = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + entityStatus = new EntityStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("removePropagationsOnEntityDelete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + removePropagationsOnEntityDelete = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("validityPeriods"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TimeBoundary.DeserializeTimeBoundary(item)); + } + validityPeriods = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasClassification(Optional.ToDictionary(attributes), typeName.Value, lastModifiedTS.Value, entityGuid.Value, Optional.ToNullable(entityStatus), Optional.ToNullable(removePropagationsOnEntityDelete), Optional.ToList(validityPeriods), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasClassification)} does not support '{options.Format}' format."); + } + } + + AtlasClassification IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasClassification(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasClassification)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasClassification FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasClassification(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassification.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassification.cs new file mode 100644 index 0000000000000..f591a19b09394 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassification.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// An instance of a classification; it doesn't have an identity, this object + /// exists only when associated with an entity. + /// + public partial class AtlasClassification + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasClassification() + { + Attributes = new ChangeTrackingDictionary(); + ValidityPeriods = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The attributes of the struct. + /// The name of the type. + /// ETag for concurrency control. + /// The GUID of the entity. + /// + /// Status of the entity - can be active or deleted. Deleted entities are not + /// removed. + /// + /// Determines if propagations will be removed on entity deletion. + /// An array of time boundaries indicating validity periods. + /// Keeps track of any properties unknown to the library. + internal AtlasClassification(IDictionary attributes, string typeName, string lastModifiedTS, string entityGuid, EntityStatus? entityStatus, bool? removePropagationsOnEntityDelete, IList validityPeriods, IDictionary serializedAdditionalRawData) + { + Attributes = attributes; + TypeName = typeName; + LastModifiedTS = lastModifiedTS; + EntityGuid = entityGuid; + EntityStatus = entityStatus; + RemovePropagationsOnEntityDelete = removePropagationsOnEntityDelete; + ValidityPeriods = validityPeriods; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The attributes of the struct. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary Attributes { get; } + /// The name of the type. + public string TypeName { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// The GUID of the entity. + public string EntityGuid { get; set; } + /// + /// Status of the entity - can be active or deleted. Deleted entities are not + /// removed. + /// + public EntityStatus? EntityStatus { get; set; } + /// Determines if propagations will be removed on entity deletion. + public bool? RemovePropagationsOnEntityDelete { get; set; } + /// An array of time boundaries indicating validity periods. + public IList ValidityPeriods { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassificationDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassificationDef.Serialization.cs new file mode 100644 index 0000000000000..b420187f609f8 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassificationDef.Serialization.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasClassificationDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasClassificationDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(DateFormatter)) + { + writer.WritePropertyName("dateFormatter"u8); + writer.WriteObjectValue(DateFormatter); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ServiceType)) + { + writer.WritePropertyName("serviceType"u8); + writer.WriteStringValue(ServiceType); + } + if (Optional.IsDefined(TypeVersion)) + { + writer.WritePropertyName("typeVersion"u8); + writer.WriteStringValue(TypeVersion); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsCollectionDefined(AttributeDefs)) + { + writer.WritePropertyName("attributeDefs"u8); + writer.WriteStartArray(); + foreach (var item in AttributeDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EntityTypes)) + { + writer.WritePropertyName("entityTypes"u8); + writer.WriteStartArray(); + foreach (var item in EntityTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SubTypes)) + { + writer.WritePropertyName("subTypes"u8); + writer.WriteStartArray(); + foreach (var item in SubTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SuperTypes)) + { + writer.WritePropertyName("superTypes"u8); + writer.WriteStartArray(); + foreach (var item in SuperTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasClassificationDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasClassificationDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasClassificationDef(document.RootElement, options); + } + + internal static AtlasClassificationDef DeserializeAtlasClassificationDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional createTime = default; + Optional createdBy = default; + Optional dateFormatter = default; + Optional description = default; + Optional guid = default; + Optional name = default; + Optional> options0 = default; + Optional serviceType = default; + Optional typeVersion = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + Optional lastModifiedTS = default; + Optional> attributeDefs = default; + Optional> entityTypes = default; + Optional> subTypes = default; + Optional> superTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("dateFormatter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateFormatter = AtlasDateFormat.DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("serviceType"u8)) + { + serviceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeVersion"u8)) + { + typeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("attributeDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasAttributeDef.DeserializeAtlasAttributeDef(item)); + } + attributeDefs = array; + continue; + } + if (property.NameEquals("entityTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + entityTypes = array; + continue; + } + if (property.NameEquals("subTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + subTypes = array; + continue; + } + if (property.NameEquals("superTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + superTypes = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasClassificationDef(Optional.ToNullable(category), Optional.ToNullable(createTime), createdBy.Value, dateFormatter.Value, description.Value, guid.Value, name.Value, Optional.ToDictionary(options0), serviceType.Value, typeVersion.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), lastModifiedTS.Value, Optional.ToList(attributeDefs), Optional.ToList(entityTypes), Optional.ToList(subTypes), Optional.ToList(superTypes), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasClassificationDef)} does not support '{options.Format}' format."); + } + } + + AtlasClassificationDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasClassificationDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasClassificationDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasClassificationDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasClassificationDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassificationDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassificationDef.cs new file mode 100644 index 0000000000000..b09ca9c6a0815 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassificationDef.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// class that captures details of a classification-type. + public partial class AtlasClassificationDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasClassificationDef() + { + Options = new ChangeTrackingDictionary(); + AttributeDefs = new ChangeTrackingList(); + EntityTypes = new ChangeTrackingList(); + SubTypes = new ChangeTrackingList(); + SuperTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The created time of the record. + /// The user who created the record. + /// The date format. + /// The description of the type definition. + /// The GUID of the type definition. + /// The name of the type definition. + /// The options for the type definition. + /// The service type. + /// The version of the type. + /// The update time of the record. + /// The user who updated the record. + /// The version of the record. + /// ETag for concurrency control. + /// An array of attribute definitions. + /// + /// Specifying a list of entityType names in the classificationDef, ensures that + /// classifications can + /// only be applied to those entityTypes. + /// + /// Any subtypes of the entity types inherit the restriction. + /// + /// Any classificationDef subtypes inherit the parents entityTypes restrictions. + /// + /// Any classificationDef subtypes can further restrict the parents entityTypes + /// restrictions by specifying a subset of the entityTypes. + /// + /// An empty entityTypes list when there are no parent restrictions means there are no + /// restrictions. + /// + /// An empty entityTypes list when there are parent + /// restrictions means that the subtype picks up the parents + /// restrictions. + /// + /// If a list of entityTypes are supplied, where one inherits + /// from another, this will be rejected. This should encourage cleaner + /// classificationsDefs. + /// + /// + /// An array of sub types. + /// An array of super types. + /// Keeps track of any properties unknown to the library. + internal AtlasClassificationDef(TypeCategory? category, long? createTime, string createdBy, AtlasDateFormat dateFormatter, string description, string guid, string name, IDictionary options, string serviceType, string typeVersion, long? updateTime, string updatedBy, long? version, string lastModifiedTS, IList attributeDefs, IList entityTypes, IList subTypes, IList superTypes, IDictionary serializedAdditionalRawData) + { + Category = category; + CreateTime = createTime; + CreatedBy = createdBy; + DateFormatter = dateFormatter; + Description = description; + Guid = guid; + Name = name; + Options = options; + ServiceType = serviceType; + TypeVersion = typeVersion; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + LastModifiedTS = lastModifiedTS; + AttributeDefs = attributeDefs; + EntityTypes = entityTypes; + SubTypes = subTypes; + SuperTypes = superTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The enum of type category. + public TypeCategory? Category { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The date format. + public AtlasDateFormat DateFormatter { get; set; } + /// The description of the type definition. + public string Description { get; set; } + /// The GUID of the type definition. + public string Guid { get; set; } + /// The name of the type definition. + public string Name { get; set; } + /// The options for the type definition. + public IDictionary Options { get; } + /// The service type. + public string ServiceType { get; set; } + /// The version of the type. + public string TypeVersion { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The version of the record. + public long? Version { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// An array of attribute definitions. + public IList AttributeDefs { get; } + /// + /// Specifying a list of entityType names in the classificationDef, ensures that + /// classifications can + /// only be applied to those entityTypes. + /// + /// Any subtypes of the entity types inherit the restriction. + /// + /// Any classificationDef subtypes inherit the parents entityTypes restrictions. + /// + /// Any classificationDef subtypes can further restrict the parents entityTypes + /// restrictions by specifying a subset of the entityTypes. + /// + /// An empty entityTypes list when there are no parent restrictions means there are no + /// restrictions. + /// + /// An empty entityTypes list when there are parent + /// restrictions means that the subtype picks up the parents + /// restrictions. + /// + /// If a list of entityTypes are supplied, where one inherits + /// from another, this will be rejected. This should encourage cleaner + /// classificationsDefs. + /// + /// + public IList EntityTypes { get; } + /// An array of sub types. + public IList SubTypes { get; } + /// An array of super types. + public IList SuperTypes { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassifications.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassifications.Serialization.cs new file mode 100644 index 0000000000000..00320a3e397ad --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassifications.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasClassifications : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasClassifications)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(List)) + { + writer.WritePropertyName("list"u8); + writer.WriteStartArray(); + foreach (var item in List) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item); +#else + using (JsonDocument document = JsonDocument.Parse(item)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PageSize)) + { + writer.WritePropertyName("pageSize"u8); + writer.WriteNumberValue(PageSize.Value); + } + if (Optional.IsDefined(SortBy)) + { + writer.WritePropertyName("sortBy"u8); + writer.WriteStringValue(SortBy); + } + if (Optional.IsDefined(SortType)) + { + writer.WritePropertyName("sortType"u8); + writer.WriteStringValue(SortType.Value.ToString()); + } + if (Optional.IsDefined(StartIndex)) + { + writer.WritePropertyName("startIndex"u8); + writer.WriteNumberValue(StartIndex.Value); + } + if (Optional.IsDefined(TotalCount)) + { + writer.WritePropertyName("totalCount"u8); + writer.WriteNumberValue(TotalCount.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasClassifications IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasClassifications)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasClassifications(document.RootElement, options); + } + + internal static AtlasClassifications DeserializeAtlasClassifications(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> list = default; + Optional pageSize = default; + Optional sortBy = default; + Optional sortType = default; + Optional startIndex = default; + Optional totalCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("list"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(BinaryData.FromString(item.GetRawText())); + } + } + list = array; + continue; + } + if (property.NameEquals("pageSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pageSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sortBy"u8)) + { + sortBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("sortType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sortType = new AtlasSortType(property.Value.GetString()); + continue; + } + if (property.NameEquals("startIndex"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startIndex = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("totalCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasClassifications(Optional.ToList(list), Optional.ToNullable(pageSize), sortBy.Value, Optional.ToNullable(sortType), Optional.ToNullable(startIndex), Optional.ToNullable(totalCount), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasClassifications)} does not support '{options.Format}' format."); + } + } + + AtlasClassifications IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasClassifications(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasClassifications)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasClassifications FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasClassifications(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassifications.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassifications.cs new file mode 100644 index 0000000000000..b4209d7382c10 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasClassifications.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// REST serialization friendly list. + public partial class AtlasClassifications + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AtlasClassifications() + { + List = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// An array of objects. + /// The size of the page. + /// The sorted by field. + /// to specify whether the result should be sorted? If yes, whether asc or desc. + /// The start index of the page. + /// The total count of items. + /// Keeps track of any properties unknown to the library. + internal AtlasClassifications(IReadOnlyList list, int? pageSize, string sortBy, AtlasSortType? sortType, int? startIndex, int? totalCount, IDictionary serializedAdditionalRawData) + { + List = list; + PageSize = pageSize; + SortBy = sortBy; + SortType = sortType; + StartIndex = startIndex; + TotalCount = totalCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// An array of objects. + /// + /// To assign an object to the element of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyList List { get; } + /// The size of the page. + public int? PageSize { get; } + /// The sorted by field. + public string SortBy { get; } + /// to specify whether the result should be sorted? If yes, whether asc or desc. + public AtlasSortType? SortType { get; } + /// The start index of the page. + public int? StartIndex { get; } + /// The total count of items. + public int? TotalCount { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasConstraintDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasConstraintDef.Serialization.cs new file mode 100644 index 0000000000000..16c01d6922b0d --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasConstraintDef.Serialization.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasConstraintDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasConstraintDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Params)) + { + writer.WritePropertyName("params"u8); + writer.WriteStartObject(); + foreach (var item in Params) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasConstraintDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasConstraintDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasConstraintDef(document.RootElement, options); + } + + internal static AtlasConstraintDef DeserializeAtlasConstraintDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> @params = default; + Optional type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("params"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + @params = dictionary; + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasConstraintDef(Optional.ToDictionary(@params), type.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasConstraintDef)} does not support '{options.Format}' format."); + } + } + + AtlasConstraintDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasConstraintDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasConstraintDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasConstraintDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasConstraintDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasConstraintDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasConstraintDef.cs new file mode 100644 index 0000000000000..895bdc2350441 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasConstraintDef.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// class that captures details of a constraint. + public partial class AtlasConstraintDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasConstraintDef() + { + Params = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The parameters of the constraint definition. + /// The type of the constraint. + /// Keeps track of any properties unknown to the library. + internal AtlasConstraintDef(IDictionary @params, string type, IDictionary serializedAdditionalRawData) + { + Params = @params; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The parameters of the constraint definition. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary Params { get; } + /// The type of the constraint. + public string Type { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasDateFormat.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasDateFormat.Serialization.cs new file mode 100644 index 0000000000000..af1fba3954b95 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasDateFormat.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasDateFormat : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasDateFormat)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AvailableLocales)) + { + writer.WritePropertyName("availableLocales"u8); + writer.WriteStartArray(); + foreach (var item in AvailableLocales) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Calendar)) + { + writer.WritePropertyName("calendar"u8); + writer.WriteNumberValue(Calendar.Value); + } + if (Optional.IsDefined(DateInstance)) + { + writer.WritePropertyName("dateInstance"u8); + writer.WriteObjectValue(DateInstance); + } + if (Optional.IsDefined(DateTimeInstance)) + { + writer.WritePropertyName("dateTimeInstance"u8); + writer.WriteObjectValue(DateTimeInstance); + } + if (Optional.IsDefined(Instance)) + { + writer.WritePropertyName("instance"u8); + writer.WriteObjectValue(Instance); + } + if (Optional.IsDefined(Lenient)) + { + writer.WritePropertyName("lenient"u8); + writer.WriteBooleanValue(Lenient.Value); + } + if (Optional.IsDefined(NumberFormat)) + { + writer.WritePropertyName("numberFormat"u8); + writer.WriteObjectValue(NumberFormat); + } + if (Optional.IsDefined(TimeInstance)) + { + writer.WritePropertyName("timeInstance"u8); + writer.WriteObjectValue(TimeInstance); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteObjectValue(TimeZone); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasDateFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasDateFormat)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasDateFormat(document.RootElement, options); + } + + internal static AtlasDateFormat DeserializeAtlasDateFormat(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> availableLocales = default; + Optional calendar = default; + Optional dateInstance = default; + Optional dateTimeInstance = default; + Optional instance = default; + Optional lenient = default; + Optional numberFormat = default; + Optional timeInstance = default; + Optional timeZone = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("availableLocales"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableLocales = array; + continue; + } + if (property.NameEquals("calendar"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + calendar = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("dateInstance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateInstance = DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("dateTimeInstance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateTimeInstance = DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("instance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instance = DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("lenient"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lenient = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("numberFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberFormat = AtlasNumberFormat.DeserializeAtlasNumberFormat(property.Value); + continue; + } + if (property.NameEquals("timeInstance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeInstance = DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeZone = AtlasTimeZone.DeserializeAtlasTimeZone(property.Value); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasDateFormat(Optional.ToList(availableLocales), Optional.ToNullable(calendar), dateInstance.Value, dateTimeInstance.Value, instance.Value, Optional.ToNullable(lenient), numberFormat.Value, timeInstance.Value, timeZone.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasDateFormat)} does not support '{options.Format}' format."); + } + } + + AtlasDateFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasDateFormat(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasDateFormat)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasDateFormat FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasDateFormat(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasDateFormat.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasDateFormat.cs new file mode 100644 index 0000000000000..99578ad0f9f36 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasDateFormat.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The date format. + public partial class AtlasDateFormat + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasDateFormat() + { + AvailableLocales = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// An array of available locales. + /// Calendar. + /// The date format. + /// The date format. + /// The date format. + /// Determines the leniency of the date format. + /// The number format. + /// The date format. + /// The timezone information. + /// Keeps track of any properties unknown to the library. + internal AtlasDateFormat(IList availableLocales, float? calendar, AtlasDateFormat dateInstance, AtlasDateFormat dateTimeInstance, AtlasDateFormat instance, bool? lenient, AtlasNumberFormat numberFormat, AtlasDateFormat timeInstance, AtlasTimeZone timeZone, IDictionary serializedAdditionalRawData) + { + AvailableLocales = availableLocales; + Calendar = calendar; + DateInstance = dateInstance; + DateTimeInstance = dateTimeInstance; + Instance = instance; + Lenient = lenient; + NumberFormat = numberFormat; + TimeInstance = timeInstance; + TimeZone = timeZone; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An array of available locales. + public IList AvailableLocales { get; } + /// Calendar. + public float? Calendar { get; set; } + /// The date format. + public AtlasDateFormat DateInstance { get; set; } + /// The date format. + public AtlasDateFormat DateTimeInstance { get; set; } + /// The date format. + public AtlasDateFormat Instance { get; set; } + /// Determines the leniency of the date format. + public bool? Lenient { get; set; } + /// The number format. + public AtlasNumberFormat NumberFormat { get; set; } + /// The date format. + public AtlasDateFormat TimeInstance { get; set; } + /// The timezone information. + public AtlasTimeZone TimeZone { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.Serialization.cs new file mode 100644 index 0000000000000..c3c57d5acf1f1 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasEntitiesWithExtInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntitiesWithExtInfo)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ReferredEntities)) + { + writer.WritePropertyName("referredEntities"u8); + writer.WriteStartObject(); + foreach (var item in ReferredEntities) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasEntitiesWithExtInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntitiesWithExtInfo)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasEntitiesWithExtInfo(document.RootElement, options); + } + + internal static AtlasEntitiesWithExtInfo DeserializeAtlasEntitiesWithExtInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> referredEntities = default; + Optional> entities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("referredEntities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, AtlasEntity.DeserializeAtlasEntity(property0.Value)); + } + referredEntities = dictionary; + continue; + } + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasEntity.DeserializeAtlasEntity(item)); + } + entities = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasEntitiesWithExtInfo(Optional.ToDictionary(referredEntities), Optional.ToList(entities), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasEntitiesWithExtInfo)} does not support '{options.Format}' format."); + } + } + + AtlasEntitiesWithExtInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasEntitiesWithExtInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasEntitiesWithExtInfo)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasEntitiesWithExtInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasEntitiesWithExtInfo(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.cs new file mode 100644 index 0000000000000..ce8d329e0b885 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// An instance of an entity along with extended info - like hive_table, + /// hive_database. + /// + public partial class AtlasEntitiesWithExtInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasEntitiesWithExtInfo() + { + ReferredEntities = new ChangeTrackingDictionary(); + Entities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The referred entities. + /// An array of entities. + /// Keeps track of any properties unknown to the library. + internal AtlasEntitiesWithExtInfo(IDictionary referredEntities, IList entities, IDictionary serializedAdditionalRawData) + { + ReferredEntities = referredEntities; + Entities = entities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The referred entities. + public IDictionary ReferredEntities { get; } + /// An array of entities. + public IList Entities { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntity.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntity.Serialization.cs new file mode 100644 index 0000000000000..bb210fb1f6449 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntity.Serialization.cs @@ -0,0 +1,594 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntity)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartObject(); + foreach (var item in Attributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsCollectionDefined(BusinessAttributes)) + { + writer.WritePropertyName("businessAttributes"u8); + writer.WriteStartObject(); + foreach (var item in BusinessAttributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Classifications)) + { + writer.WritePropertyName("classifications"u8); + writer.WriteStartArray(); + foreach (var item in Classifications) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsCollectionDefined(CustomAttributes)) + { + writer.WritePropertyName("customAttributes"u8); + writer.WriteStartObject(); + foreach (var item in CustomAttributes) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(HomeId)) + { + writer.WritePropertyName("homeId"u8); + writer.WriteStringValue(HomeId); + } + if (options.Format != "W" && Optional.IsDefined(CollectionId)) + { + writer.WritePropertyName("collectionId"u8); + writer.WriteStringValue(CollectionId); + } + if (Optional.IsDefined(IsIncomplete)) + { + writer.WritePropertyName("isIncomplete"u8); + writer.WriteBooleanValue(IsIncomplete.Value); + } + if (Optional.IsCollectionDefined(Labels)) + { + writer.WritePropertyName("labels"u8); + writer.WriteStartArray(); + foreach (var item in Labels) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Meanings)) + { + writer.WritePropertyName("meanings"u8); + writer.WriteStartArray(); + foreach (var item in Meanings) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ProvenanceType)) + { + writer.WritePropertyName("provenanceType"u8); + writer.WriteNumberValue(ProvenanceType.Value); + } + if (Optional.IsDefined(Proxy)) + { + writer.WritePropertyName("proxy"u8); + writer.WriteBooleanValue(Proxy.Value); + } + if (Optional.IsCollectionDefined(RelationshipAttributes)) + { + writer.WritePropertyName("relationshipAttributes"u8); + writer.WriteStartObject(); + foreach (var item in RelationshipAttributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsCollectionDefined(Contacts)) + { + writer.WritePropertyName("contacts"u8); + writer.WriteStartObject(); + foreach (var item in Contacts) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartArray(); + foreach (var item0 in item.Value) + { + writer.WriteObjectValue(item0); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntity)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasEntity(document.RootElement, options); + } + + internal static AtlasEntity DeserializeAtlasEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> attributes = default; + Optional typeName = default; + Optional lastModifiedTS = default; + Optional> businessAttributes = default; + Optional> classifications = default; + Optional createTime = default; + Optional createdBy = default; + Optional> customAttributes = default; + Optional guid = default; + Optional homeId = default; + Optional collectionId = default; + Optional isIncomplete = default; + Optional> labels = default; + Optional> meanings = default; + Optional provenanceType = default; + Optional proxy = default; + Optional> relationshipAttributes = default; + Optional status = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + Optional>> contacts = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + attributes = dictionary; + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("businessAttributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + businessAttributes = dictionary; + continue; + } + if (property.NameEquals("classifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasClassification.DeserializeAtlasClassification(item)); + } + classifications = array; + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("customAttributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + customAttributes = dictionary; + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("homeId"u8)) + { + homeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("collectionId"u8)) + { + collectionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isIncomplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isIncomplete = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + labels = array; + continue; + } + if (property.NameEquals("meanings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasTermAssignmentHeader.DeserializeAtlasTermAssignmentHeader(item)); + } + meanings = array; + continue; + } + if (property.NameEquals("provenanceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provenanceType = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("proxy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + proxy = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("relationshipAttributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + relationshipAttributes = dictionary; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new EntityStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("contacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ContactInfo.DeserializeContactInfo(item)); + } + dictionary.Add(property0.Name, array); + } + } + contacts = dictionary; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasEntity(Optional.ToDictionary(attributes), typeName.Value, lastModifiedTS.Value, Optional.ToDictionary(businessAttributes), Optional.ToList(classifications), Optional.ToNullable(createTime), createdBy.Value, Optional.ToDictionary(customAttributes), guid.Value, homeId.Value, collectionId.Value, Optional.ToNullable(isIncomplete), Optional.ToList(labels), Optional.ToList(meanings), Optional.ToNullable(provenanceType), Optional.ToNullable(proxy), Optional.ToDictionary(relationshipAttributes), Optional.ToNullable(status), Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), Optional.ToDictionary(contacts), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasEntity)} does not support '{options.Format}' format."); + } + } + + AtlasEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasEntity)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasEntity(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntity.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntity.cs new file mode 100644 index 0000000000000..1139aef42d776 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntity.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// An instance of an entity - like hive_table, hive_database. + public partial class AtlasEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasEntity() + { + Attributes = new ChangeTrackingDictionary(); + BusinessAttributes = new ChangeTrackingDictionary(); + Classifications = new ChangeTrackingList(); + CustomAttributes = new ChangeTrackingDictionary(); + Labels = new ChangeTrackingList(); + Meanings = new ChangeTrackingList(); + RelationshipAttributes = new ChangeTrackingDictionary(); + Contacts = new ChangeTrackingDictionary>(); + } + + /// Initializes a new instance of . + /// The attributes of the struct. + /// The name of the type. + /// ETag for concurrency control. + /// Business attributes. + /// An array of classifications. + /// The created time of the record. + /// The user who created the record. + /// Custom Attribute. + /// The GUID of the entity. + /// The home ID of the entity. + /// The collection ID of the entity. + /// Whether it is a shell entity. + /// labels. + /// An array of term assignment headers indicating the meanings of the entity. + /// Used to record the provenance of an instance of an entity or relationship. + /// Determines if there's a proxy. + /// The attributes of relationship. + /// + /// Status of the entity - can be active or deleted. Deleted entities are not + /// removed. + /// + /// The update time of the record. + /// The user who updated the record. + /// The version of the entity. + /// The dictionary of contacts for entities. Key could be Expert or Owner. + /// Keeps track of any properties unknown to the library. + internal AtlasEntity(IDictionary attributes, string typeName, string lastModifiedTS, IDictionary businessAttributes, IList classifications, long? createTime, string createdBy, IDictionary customAttributes, string guid, string homeId, string collectionId, bool? isIncomplete, IList labels, IList meanings, int? provenanceType, bool? proxy, IDictionary relationshipAttributes, EntityStatus? status, long? updateTime, string updatedBy, long? version, IDictionary> contacts, IDictionary serializedAdditionalRawData) + { + Attributes = attributes; + TypeName = typeName; + LastModifiedTS = lastModifiedTS; + BusinessAttributes = businessAttributes; + Classifications = classifications; + CreateTime = createTime; + CreatedBy = createdBy; + CustomAttributes = customAttributes; + Guid = guid; + HomeId = homeId; + CollectionId = collectionId; + IsIncomplete = isIncomplete; + Labels = labels; + Meanings = meanings; + ProvenanceType = provenanceType; + Proxy = proxy; + RelationshipAttributes = relationshipAttributes; + Status = status; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + Contacts = contacts; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The attributes of the struct. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary Attributes { get; } + /// The name of the type. + public string TypeName { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// + /// Business attributes + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary BusinessAttributes { get; } + /// An array of classifications. + public IList Classifications { get; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// Custom Attribute. + public IDictionary CustomAttributes { get; } + /// The GUID of the entity. + public string Guid { get; set; } + /// The home ID of the entity. + public string HomeId { get; set; } + /// The collection ID of the entity. + public string CollectionId { get; } + /// Whether it is a shell entity. + public bool? IsIncomplete { get; set; } + /// labels. + public IList Labels { get; } + /// An array of term assignment headers indicating the meanings of the entity. + public IList Meanings { get; } + /// Used to record the provenance of an instance of an entity or relationship. + public int? ProvenanceType { get; set; } + /// Determines if there's a proxy. + public bool? Proxy { get; set; } + /// + /// The attributes of relationship. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary RelationshipAttributes { get; } + /// + /// Status of the entity - can be active or deleted. Deleted entities are not + /// removed. + /// + public EntityStatus? Status { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The version of the entity. + public long? Version { get; set; } + /// The dictionary of contacts for entities. Key could be Expert or Owner. + public IDictionary> Contacts { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityDef.Serialization.cs new file mode 100644 index 0000000000000..244900c08bca8 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityDef.Serialization.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasEntityDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntityDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(DateFormatter)) + { + writer.WritePropertyName("dateFormatter"u8); + writer.WriteObjectValue(DateFormatter); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ServiceType)) + { + writer.WritePropertyName("serviceType"u8); + writer.WriteStringValue(ServiceType); + } + if (Optional.IsDefined(TypeVersion)) + { + writer.WritePropertyName("typeVersion"u8); + writer.WriteStringValue(TypeVersion); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsCollectionDefined(AttributeDefs)) + { + writer.WritePropertyName("attributeDefs"u8); + writer.WriteStartArray(); + foreach (var item in AttributeDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SubTypes)) + { + writer.WritePropertyName("subTypes"u8); + writer.WriteStartArray(); + foreach (var item in SubTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SuperTypes)) + { + writer.WritePropertyName("superTypes"u8); + writer.WriteStartArray(); + foreach (var item in SuperTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RelationshipAttributeDefs)) + { + writer.WritePropertyName("relationshipAttributeDefs"u8); + writer.WriteStartArray(); + foreach (var item in RelationshipAttributeDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasEntityDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntityDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasEntityDef(document.RootElement, options); + } + + internal static AtlasEntityDef DeserializeAtlasEntityDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional createTime = default; + Optional createdBy = default; + Optional dateFormatter = default; + Optional description = default; + Optional guid = default; + Optional name = default; + Optional> options0 = default; + Optional serviceType = default; + Optional typeVersion = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + Optional lastModifiedTS = default; + Optional> attributeDefs = default; + Optional> subTypes = default; + Optional> superTypes = default; + Optional> relationshipAttributeDefs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("dateFormatter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateFormatter = AtlasDateFormat.DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("serviceType"u8)) + { + serviceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeVersion"u8)) + { + typeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("attributeDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasAttributeDef.DeserializeAtlasAttributeDef(item)); + } + attributeDefs = array; + continue; + } + if (property.NameEquals("subTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + subTypes = array; + continue; + } + if (property.NameEquals("superTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + superTypes = array; + continue; + } + if (property.NameEquals("relationshipAttributeDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelationshipAttributeDef.DeserializeAtlasRelationshipAttributeDef(item)); + } + relationshipAttributeDefs = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasEntityDef(Optional.ToNullable(category), Optional.ToNullable(createTime), createdBy.Value, dateFormatter.Value, description.Value, guid.Value, name.Value, Optional.ToDictionary(options0), serviceType.Value, typeVersion.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), lastModifiedTS.Value, Optional.ToList(attributeDefs), Optional.ToList(subTypes), Optional.ToList(superTypes), Optional.ToList(relationshipAttributeDefs), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasEntityDef)} does not support '{options.Format}' format."); + } + } + + AtlasEntityDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasEntityDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasEntityDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasEntityDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasEntityDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityDef.cs new file mode 100644 index 0000000000000..24ff9953bfb23 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityDef.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// class that captures details of a entity-type. + public partial class AtlasEntityDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasEntityDef() + { + Options = new ChangeTrackingDictionary(); + AttributeDefs = new ChangeTrackingList(); + SubTypes = new ChangeTrackingList(); + SuperTypes = new ChangeTrackingList(); + RelationshipAttributeDefs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The created time of the record. + /// The user who created the record. + /// The date format. + /// The description of the type definition. + /// The GUID of the type definition. + /// The name of the type definition. + /// The options for the type definition. + /// The service type. + /// The version of the type. + /// The update time of the record. + /// The user who updated the record. + /// The version of the record. + /// ETag for concurrency control. + /// An array of attribute definitions. + /// An array of sub types. + /// An array of super types. + /// An array of relationship attributes. + /// Keeps track of any properties unknown to the library. + internal AtlasEntityDef(TypeCategory? category, long? createTime, string createdBy, AtlasDateFormat dateFormatter, string description, string guid, string name, IDictionary options, string serviceType, string typeVersion, long? updateTime, string updatedBy, long? version, string lastModifiedTS, IList attributeDefs, IList subTypes, IList superTypes, IList relationshipAttributeDefs, IDictionary serializedAdditionalRawData) + { + Category = category; + CreateTime = createTime; + CreatedBy = createdBy; + DateFormatter = dateFormatter; + Description = description; + Guid = guid; + Name = name; + Options = options; + ServiceType = serviceType; + TypeVersion = typeVersion; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + LastModifiedTS = lastModifiedTS; + AttributeDefs = attributeDefs; + SubTypes = subTypes; + SuperTypes = superTypes; + RelationshipAttributeDefs = relationshipAttributeDefs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The enum of type category. + public TypeCategory? Category { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The date format. + public AtlasDateFormat DateFormatter { get; set; } + /// The description of the type definition. + public string Description { get; set; } + /// The GUID of the type definition. + public string Guid { get; set; } + /// The name of the type definition. + public string Name { get; set; } + /// The options for the type definition. + public IDictionary Options { get; } + /// The service type. + public string ServiceType { get; set; } + /// The version of the type. + public string TypeVersion { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The version of the record. + public long? Version { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// An array of attribute definitions. + public IList AttributeDefs { get; } + /// An array of sub types. + public IList SubTypes { get; } + /// An array of super types. + public IList SuperTypes { get; } + /// An array of relationship attributes. + public IList RelationshipAttributeDefs { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeader.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeader.Serialization.cs new file mode 100644 index 0000000000000..69ee0fe229024 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeader.Serialization.cs @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasEntityHeader : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntityHeader)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartObject(); + foreach (var item in Attributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsCollectionDefined(ClassificationNames)) + { + writer.WritePropertyName("classificationNames"u8); + writer.WriteStartArray(); + foreach (var item in ClassificationNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Classifications)) + { + writer.WritePropertyName("classifications"u8); + writer.WriteStartArray(); + foreach (var item in Classifications) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DisplayText)) + { + writer.WritePropertyName("displayText"u8); + writer.WriteStringValue(DisplayText); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(IsIncomplete)) + { + writer.WritePropertyName("isIncomplete"u8); + writer.WriteBooleanValue(IsIncomplete.Value); + } + if (Optional.IsCollectionDefined(Labels)) + { + writer.WritePropertyName("labels"u8); + writer.WriteStartArray(); + foreach (var item in Labels) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MeaningNames)) + { + writer.WritePropertyName("meaningNames"u8); + writer.WriteStartArray(); + foreach (var item in MeaningNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Meanings)) + { + writer.WritePropertyName("meanings"u8); + writer.WriteStartArray(); + foreach (var item in Meanings) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasEntityHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntityHeader)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasEntityHeader(document.RootElement, options); + } + + internal static AtlasEntityHeader DeserializeAtlasEntityHeader(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> attributes = default; + Optional typeName = default; + Optional lastModifiedTS = default; + Optional> classificationNames = default; + Optional> classifications = default; + Optional displayText = default; + Optional guid = default; + Optional isIncomplete = default; + Optional> labels = default; + Optional> meaningNames = default; + Optional> meanings = default; + Optional status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + attributes = dictionary; + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("classificationNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + classificationNames = array; + continue; + } + if (property.NameEquals("classifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasClassification.DeserializeAtlasClassification(item)); + } + classifications = array; + continue; + } + if (property.NameEquals("displayText"u8)) + { + displayText = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("isIncomplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isIncomplete = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + labels = array; + continue; + } + if (property.NameEquals("meaningNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + meaningNames = array; + continue; + } + if (property.NameEquals("meanings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasTermAssignmentHeader.DeserializeAtlasTermAssignmentHeader(item)); + } + meanings = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new EntityStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasEntityHeader(Optional.ToDictionary(attributes), typeName.Value, lastModifiedTS.Value, Optional.ToList(classificationNames), Optional.ToList(classifications), displayText.Value, guid.Value, Optional.ToNullable(isIncomplete), Optional.ToList(labels), Optional.ToList(meaningNames), Optional.ToList(meanings), Optional.ToNullable(status), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasEntityHeader)} does not support '{options.Format}' format."); + } + } + + AtlasEntityHeader IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasEntityHeader(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasEntityHeader)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasEntityHeader FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasEntityHeader(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeader.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeader.cs new file mode 100644 index 0000000000000..fa2a782046f26 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeader.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// An instance of an entity - like hive_table, hive_database. + public partial class AtlasEntityHeader + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasEntityHeader() + { + Attributes = new ChangeTrackingDictionary(); + ClassificationNames = new ChangeTrackingList(); + Classifications = new ChangeTrackingList(); + Labels = new ChangeTrackingList(); + MeaningNames = new ChangeTrackingList(); + Meanings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The attributes of the struct. + /// The name of the type. + /// ETag for concurrency control. + /// An array of classification names. + /// An array of classifications. + /// The display text. + /// The GUID of the record. + /// Whether it is a shell entity. + /// labels. + /// An array of meanings. + /// An array of term assignment headers. + /// + /// Status of the entity - can be active or deleted. Deleted entities are not + /// removed. + /// + /// Keeps track of any properties unknown to the library. + internal AtlasEntityHeader(IDictionary attributes, string typeName, string lastModifiedTS, IList classificationNames, IList classifications, string displayText, string guid, bool? isIncomplete, IList labels, IList meaningNames, IList meanings, EntityStatus? status, IDictionary serializedAdditionalRawData) + { + Attributes = attributes; + TypeName = typeName; + LastModifiedTS = lastModifiedTS; + ClassificationNames = classificationNames; + Classifications = classifications; + DisplayText = displayText; + Guid = guid; + IsIncomplete = isIncomplete; + Labels = labels; + MeaningNames = meaningNames; + Meanings = meanings; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The attributes of the struct. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary Attributes { get; } + /// The name of the type. + public string TypeName { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// An array of classification names. + public IList ClassificationNames { get; } + /// An array of classifications. + public IList Classifications { get; } + /// The display text. + public string DisplayText { get; set; } + /// The GUID of the record. + public string Guid { get; set; } + /// Whether it is a shell entity. + public bool? IsIncomplete { get; set; } + /// labels. + public IList Labels { get; } + /// An array of meanings. + public IList MeaningNames { get; } + /// An array of term assignment headers. + public IList Meanings { get; } + /// + /// Status of the entity - can be active or deleted. Deleted entities are not + /// removed. + /// + public EntityStatus? Status { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.Serialization.cs new file mode 100644 index 0000000000000..2bae7daadc6f5 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasEntityHeaders : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntityHeaders)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(GuidHeaderMap)) + { + writer.WritePropertyName("guidHeaderMap"u8); + writer.WriteStartObject(); + foreach (var item in GuidHeaderMap) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasEntityHeaders IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntityHeaders)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasEntityHeaders(document.RootElement, options); + } + + internal static AtlasEntityHeaders DeserializeAtlasEntityHeaders(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> guidHeaderMap = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("guidHeaderMap"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, AtlasEntityHeader.DeserializeAtlasEntityHeader(property0.Value)); + } + guidHeaderMap = dictionary; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasEntityHeaders(Optional.ToDictionary(guidHeaderMap), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasEntityHeaders)} does not support '{options.Format}' format."); + } + } + + AtlasEntityHeaders IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasEntityHeaders(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasEntityHeaders)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasEntityHeaders FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasEntityHeaders(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.cs new file mode 100644 index 0000000000000..0980e0286208a --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// An instance of an entity header map. + public partial class AtlasEntityHeaders + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasEntityHeaders() + { + GuidHeaderMap = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The description of the guid header map,. + /// Keeps track of any properties unknown to the library. + internal AtlasEntityHeaders(IDictionary guidHeaderMap, IDictionary serializedAdditionalRawData) + { + GuidHeaderMap = guidHeaderMap; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The description of the guid header map,. + public IDictionary GuidHeaderMap { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.Serialization.cs new file mode 100644 index 0000000000000..2cdc22c16c0e1 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasEntityWithExtInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntityWithExtInfo)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ReferredEntities)) + { + writer.WritePropertyName("referredEntities"u8); + writer.WriteStartObject(); + foreach (var item in ReferredEntities) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Entity)) + { + writer.WritePropertyName("entity"u8); + writer.WriteObjectValue(Entity); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasEntityWithExtInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEntityWithExtInfo)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasEntityWithExtInfo(document.RootElement, options); + } + + internal static AtlasEntityWithExtInfo DeserializeAtlasEntityWithExtInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> referredEntities = default; + Optional entity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("referredEntities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, AtlasEntity.DeserializeAtlasEntity(property0.Value)); + } + referredEntities = dictionary; + continue; + } + if (property.NameEquals("entity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + entity = AtlasEntity.DeserializeAtlasEntity(property.Value); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasEntityWithExtInfo(Optional.ToDictionary(referredEntities), entity.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasEntityWithExtInfo)} does not support '{options.Format}' format."); + } + } + + AtlasEntityWithExtInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasEntityWithExtInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasEntityWithExtInfo)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasEntityWithExtInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasEntityWithExtInfo(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.cs new file mode 100644 index 0000000000000..03a8f88577007 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// An instance of an entity along with extended info - like hive_table, + /// hive_database. + /// + public partial class AtlasEntityWithExtInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasEntityWithExtInfo() + { + ReferredEntities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The referred entities. + /// An instance of an entity - like hive_table, hive_database. + /// Keeps track of any properties unknown to the library. + internal AtlasEntityWithExtInfo(IDictionary referredEntities, AtlasEntity entity, IDictionary serializedAdditionalRawData) + { + ReferredEntities = referredEntities; + Entity = entity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The referred entities. + public IDictionary ReferredEntities { get; } + /// An instance of an entity - like hive_table, hive_database. + public AtlasEntity Entity { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumDef.Serialization.cs new file mode 100644 index 0000000000000..b9675c1b3001e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumDef.Serialization.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasEnumDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEnumDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(DateFormatter)) + { + writer.WritePropertyName("dateFormatter"u8); + writer.WriteObjectValue(DateFormatter); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ServiceType)) + { + writer.WritePropertyName("serviceType"u8); + writer.WriteStringValue(ServiceType); + } + if (Optional.IsDefined(TypeVersion)) + { + writer.WritePropertyName("typeVersion"u8); + writer.WriteStringValue(TypeVersion); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsDefined(DefaultValue)) + { + writer.WritePropertyName("defaultValue"u8); + writer.WriteStringValue(DefaultValue); + } + if (Optional.IsCollectionDefined(ElementDefs)) + { + writer.WritePropertyName("elementDefs"u8); + writer.WriteStartArray(); + foreach (var item in ElementDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasEnumDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEnumDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasEnumDef(document.RootElement, options); + } + + internal static AtlasEnumDef DeserializeAtlasEnumDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional createTime = default; + Optional createdBy = default; + Optional dateFormatter = default; + Optional description = default; + Optional guid = default; + Optional name = default; + Optional> options0 = default; + Optional serviceType = default; + Optional typeVersion = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + Optional lastModifiedTS = default; + Optional defaultValue = default; + Optional> elementDefs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("dateFormatter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateFormatter = AtlasDateFormat.DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("serviceType"u8)) + { + serviceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeVersion"u8)) + { + typeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultValue"u8)) + { + defaultValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("elementDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasEnumElementDef.DeserializeAtlasEnumElementDef(item)); + } + elementDefs = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasEnumDef(Optional.ToNullable(category), Optional.ToNullable(createTime), createdBy.Value, dateFormatter.Value, description.Value, guid.Value, name.Value, Optional.ToDictionary(options0), serviceType.Value, typeVersion.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), lastModifiedTS.Value, defaultValue.Value, Optional.ToList(elementDefs), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasEnumDef)} does not support '{options.Format}' format."); + } + } + + AtlasEnumDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasEnumDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasEnumDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasEnumDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasEnumDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumDef.cs new file mode 100644 index 0000000000000..35e2d761a4c0c --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumDef.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// class that captures details of an enum-type. + public partial class AtlasEnumDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasEnumDef() + { + Options = new ChangeTrackingDictionary(); + ElementDefs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The created time of the record. + /// The user who created the record. + /// The date format. + /// The description of the type definition. + /// The GUID of the type definition. + /// The name of the type definition. + /// The options for the type definition. + /// The service type. + /// The version of the type. + /// The update time of the record. + /// The user who updated the record. + /// The version of the record. + /// ETag for concurrency control. + /// The default value. + /// An array of enum element definitions. + /// Keeps track of any properties unknown to the library. + internal AtlasEnumDef(TypeCategory? category, long? createTime, string createdBy, AtlasDateFormat dateFormatter, string description, string guid, string name, IDictionary options, string serviceType, string typeVersion, long? updateTime, string updatedBy, long? version, string lastModifiedTS, string defaultValue, IList elementDefs, IDictionary serializedAdditionalRawData) + { + Category = category; + CreateTime = createTime; + CreatedBy = createdBy; + DateFormatter = dateFormatter; + Description = description; + Guid = guid; + Name = name; + Options = options; + ServiceType = serviceType; + TypeVersion = typeVersion; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + LastModifiedTS = lastModifiedTS; + DefaultValue = defaultValue; + ElementDefs = elementDefs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The enum of type category. + public TypeCategory? Category { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The date format. + public AtlasDateFormat DateFormatter { get; set; } + /// The description of the type definition. + public string Description { get; set; } + /// The GUID of the type definition. + public string Guid { get; set; } + /// The name of the type definition. + public string Name { get; set; } + /// The options for the type definition. + public IDictionary Options { get; } + /// The service type. + public string ServiceType { get; set; } + /// The version of the type. + public string TypeVersion { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The version of the record. + public long? Version { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// The default value. + public string DefaultValue { get; set; } + /// An array of enum element definitions. + public IList ElementDefs { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumElementDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumElementDef.Serialization.cs new file mode 100644 index 0000000000000..bdc77d9e70bd3 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumElementDef.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasEnumElementDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEnumElementDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Ordinal)) + { + writer.WritePropertyName("ordinal"u8); + writer.WriteNumberValue(Ordinal.Value); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasEnumElementDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasEnumElementDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasEnumElementDef(document.RootElement, options); + } + + internal static AtlasEnumElementDef DeserializeAtlasEnumElementDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional description = default; + Optional ordinal = default; + Optional value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("ordinal"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ordinal = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasEnumElementDef(description.Value, Optional.ToNullable(ordinal), value.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasEnumElementDef)} does not support '{options.Format}' format."); + } + } + + AtlasEnumElementDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasEnumElementDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasEnumElementDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasEnumElementDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasEnumElementDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumElementDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumElementDef.cs new file mode 100644 index 0000000000000..983f6de3d819f --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEnumElementDef.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// class that captures details of an enum-element. + public partial class AtlasEnumElementDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasEnumElementDef() + { + } + + /// Initializes a new instance of . + /// The description of the enum element definition. + /// The ordinal of the enum element definition. + /// The value of the enum element definition. + /// Keeps track of any properties unknown to the library. + internal AtlasEnumElementDef(string description, int? ordinal, string value, IDictionary serializedAdditionalRawData) + { + Description = description; + Ordinal = ordinal; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The description of the enum element definition. + public string Description { get; set; } + /// The ordinal of the enum element definition. + public int? Ordinal { get; set; } + /// The value of the enum element definition. + public string Value { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.Serialization.cs new file mode 100644 index 0000000000000..09d4df983fb45 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.Serialization.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasGlossary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossary)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsCollectionDefined(Classifications)) + { + writer.WritePropertyName("classifications"u8); + writer.WriteStartArray(); + foreach (var item in Classifications) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LongDescription)) + { + writer.WritePropertyName("longDescription"u8); + writer.WriteStringValue(LongDescription); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(QualifiedName)) + { + writer.WritePropertyName("qualifiedName"u8); + writer.WriteStringValue(QualifiedName); + } + if (Optional.IsDefined(ShortDescription)) + { + writer.WritePropertyName("shortDescription"u8); + writer.WriteStringValue(ShortDescription); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsCollectionDefined(Categories)) + { + writer.WritePropertyName("categories"u8); + writer.WriteStartArray(); + foreach (var item in Categories) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsCollectionDefined(Terms)) + { + writer.WritePropertyName("terms"u8); + writer.WriteStartArray(); + foreach (var item in Terms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Usage)) + { + writer.WritePropertyName("usage"u8); + writer.WriteStringValue(Usage); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasGlossary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossary)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasGlossary(document.RootElement, options); + } + + internal static AtlasGlossary DeserializeAtlasGlossary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional guid = default; + Optional> classifications = default; + Optional longDescription = default; + Optional name = default; + Optional qualifiedName = default; + Optional shortDescription = default; + Optional lastModifiedTS = default; + Optional createTime = default; + Optional createdBy = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional> categories = default; + Optional language = default; + Optional> terms = default; + Optional usage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("classifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasClassification.DeserializeAtlasClassification(item)); + } + classifications = array; + continue; + } + if (property.NameEquals("longDescription"u8)) + { + longDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("qualifiedName"u8)) + { + qualifiedName = property.Value.GetString(); + continue; + } + if (property.NameEquals("shortDescription"u8)) + { + shortDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("categories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedCategoryHeader.DeserializeAtlasRelatedCategoryHeader(item)); + } + categories = array; + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("terms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + terms = array; + continue; + } + if (property.NameEquals("usage"u8)) + { + usage = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasGlossary(guid.Value, Optional.ToList(classifications), longDescription.Value, name.Value, qualifiedName.Value, shortDescription.Value, lastModifiedTS.Value, Optional.ToNullable(createTime), createdBy.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToList(categories), language.Value, Optional.ToList(terms), usage.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasGlossary)} does not support '{options.Format}' format."); + } + } + + AtlasGlossary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasGlossary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasGlossary)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasGlossary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasGlossary(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.cs new file mode 100644 index 0000000000000..21007e5f78c6d --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The glossary object. + public partial class AtlasGlossary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasGlossary() + { + Classifications = new ChangeTrackingList(); + Categories = new ChangeTrackingList(); + Terms = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The GUID of the object. + /// An array of classifications. + /// The long version description. + /// The name of the glossary object. + /// The qualified name of the glossary object. + /// The short version of description. + /// ETag for concurrency control. + /// The created time of the record. + /// The user who created the record. + /// The update time of the record. + /// The user who updated the record. + /// An array of categories. + /// The language of the glossary. + /// An array of related term headers. + /// The usage of the glossary. + /// Keeps track of any properties unknown to the library. + internal AtlasGlossary(string guid, IList classifications, string longDescription, string name, string qualifiedName, string shortDescription, string lastModifiedTS, long? createTime, string createdBy, long? updateTime, string updatedBy, IList categories, string language, IList terms, string usage, IDictionary serializedAdditionalRawData) + { + Guid = guid; + Classifications = classifications; + LongDescription = longDescription; + Name = name; + QualifiedName = qualifiedName; + ShortDescription = shortDescription; + LastModifiedTS = lastModifiedTS; + CreateTime = createTime; + CreatedBy = createdBy; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Categories = categories; + Language = language; + Terms = terms; + Usage = usage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the object. + public string Guid { get; set; } + /// An array of classifications. + public IList Classifications { get; } + /// The long version description. + public string LongDescription { get; set; } + /// The name of the glossary object. + public string Name { get; set; } + /// The qualified name of the glossary object. + public string QualifiedName { get; set; } + /// The short version of description. + public string ShortDescription { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// An array of categories. + public IList Categories { get; } + /// The language of the glossary. + public string Language { get; set; } + /// An array of related term headers. + public IList Terms { get; } + /// The usage of the glossary. + public string Usage { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryCategory.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryCategory.Serialization.cs new file mode 100644 index 0000000000000..d4fe277bc5cf3 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryCategory.Serialization.cs @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasGlossaryCategory : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossaryCategory)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsCollectionDefined(Classifications)) + { + writer.WritePropertyName("classifications"u8); + writer.WriteStartArray(); + foreach (var item in Classifications) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LongDescription)) + { + writer.WritePropertyName("longDescription"u8); + writer.WriteStringValue(LongDescription); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(QualifiedName)) + { + writer.WritePropertyName("qualifiedName"u8); + writer.WriteStringValue(QualifiedName); + } + if (Optional.IsDefined(ShortDescription)) + { + writer.WritePropertyName("shortDescription"u8); + writer.WriteStringValue(ShortDescription); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Anchor)) + { + writer.WritePropertyName("anchor"u8); + writer.WriteObjectValue(Anchor); + } + if (Optional.IsCollectionDefined(ChildrenCategories)) + { + writer.WritePropertyName("childrenCategories"u8); + writer.WriteStartArray(); + foreach (var item in ChildrenCategories) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ParentCategory)) + { + writer.WritePropertyName("parentCategory"u8); + writer.WriteObjectValue(ParentCategory); + } + if (Optional.IsCollectionDefined(Terms)) + { + writer.WritePropertyName("terms"u8); + writer.WriteStartArray(); + foreach (var item in Terms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasGlossaryCategory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossaryCategory)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasGlossaryCategory(document.RootElement, options); + } + + internal static AtlasGlossaryCategory DeserializeAtlasGlossaryCategory(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional guid = default; + Optional> classifications = default; + Optional longDescription = default; + Optional name = default; + Optional qualifiedName = default; + Optional shortDescription = default; + Optional lastModifiedTS = default; + Optional createTime = default; + Optional createdBy = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional anchor = default; + Optional> childrenCategories = default; + Optional parentCategory = default; + Optional> terms = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("classifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasClassification.DeserializeAtlasClassification(item)); + } + classifications = array; + continue; + } + if (property.NameEquals("longDescription"u8)) + { + longDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("qualifiedName"u8)) + { + qualifiedName = property.Value.GetString(); + continue; + } + if (property.NameEquals("shortDescription"u8)) + { + shortDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("anchor"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + anchor = AtlasGlossaryHeader.DeserializeAtlasGlossaryHeader(property.Value); + continue; + } + if (property.NameEquals("childrenCategories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedCategoryHeader.DeserializeAtlasRelatedCategoryHeader(item)); + } + childrenCategories = array; + continue; + } + if (property.NameEquals("parentCategory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parentCategory = AtlasRelatedCategoryHeader.DeserializeAtlasRelatedCategoryHeader(property.Value); + continue; + } + if (property.NameEquals("terms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + terms = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasGlossaryCategory(guid.Value, Optional.ToList(classifications), longDescription.Value, name.Value, qualifiedName.Value, shortDescription.Value, lastModifiedTS.Value, Optional.ToNullable(createTime), createdBy.Value, Optional.ToNullable(updateTime), updatedBy.Value, anchor.Value, Optional.ToList(childrenCategories), parentCategory.Value, Optional.ToList(terms), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasGlossaryCategory)} does not support '{options.Format}' format."); + } + } + + AtlasGlossaryCategory IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasGlossaryCategory(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasGlossaryCategory)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasGlossaryCategory FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasGlossaryCategory(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryCategory.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryCategory.cs new file mode 100644 index 0000000000000..6eb3d4cbac7f1 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryCategory.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The glossary category. + public partial class AtlasGlossaryCategory + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasGlossaryCategory() + { + Classifications = new ChangeTrackingList(); + ChildrenCategories = new ChangeTrackingList(); + Terms = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The GUID of the object. + /// An array of classifications. + /// The long version description. + /// The name of the glossary object. + /// The qualified name of the glossary object. + /// The short version of description. + /// ETag for concurrency control. + /// The created time of the record. + /// The user who created the record. + /// The update time of the record. + /// The user who updated the record. + /// The glossary header with basic information. + /// An array of children categories. + /// The header of the related category. + /// An array of related term headers. + /// Keeps track of any properties unknown to the library. + internal AtlasGlossaryCategory(string guid, IList classifications, string longDescription, string name, string qualifiedName, string shortDescription, string lastModifiedTS, long? createTime, string createdBy, long? updateTime, string updatedBy, AtlasGlossaryHeader anchor, IList childrenCategories, AtlasRelatedCategoryHeader parentCategory, IList terms, IDictionary serializedAdditionalRawData) + { + Guid = guid; + Classifications = classifications; + LongDescription = longDescription; + Name = name; + QualifiedName = qualifiedName; + ShortDescription = shortDescription; + LastModifiedTS = lastModifiedTS; + CreateTime = createTime; + CreatedBy = createdBy; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Anchor = anchor; + ChildrenCategories = childrenCategories; + ParentCategory = parentCategory; + Terms = terms; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the object. + public string Guid { get; set; } + /// An array of classifications. + public IList Classifications { get; } + /// The long version description. + public string LongDescription { get; set; } + /// The name of the glossary object. + public string Name { get; set; } + /// The qualified name of the glossary object. + public string QualifiedName { get; set; } + /// The short version of description. + public string ShortDescription { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The glossary header with basic information. + public AtlasGlossaryHeader Anchor { get; set; } + /// An array of children categories. + public IList ChildrenCategories { get; } + /// The header of the related category. + public AtlasRelatedCategoryHeader ParentCategory { get; set; } + /// An array of related term headers. + public IList Terms { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryExtInfo.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryExtInfo.Serialization.cs new file mode 100644 index 0000000000000..8747c5a76f02e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryExtInfo.Serialization.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasGlossaryExtInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossaryExtInfo)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsCollectionDefined(Classifications)) + { + writer.WritePropertyName("classifications"u8); + writer.WriteStartArray(); + foreach (var item in Classifications) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LongDescription)) + { + writer.WritePropertyName("longDescription"u8); + writer.WriteStringValue(LongDescription); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(QualifiedName)) + { + writer.WritePropertyName("qualifiedName"u8); + writer.WriteStringValue(QualifiedName); + } + if (Optional.IsDefined(ShortDescription)) + { + writer.WritePropertyName("shortDescription"u8); + writer.WriteStringValue(ShortDescription); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsCollectionDefined(Categories)) + { + writer.WritePropertyName("categories"u8); + writer.WriteStartArray(); + foreach (var item in Categories) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsCollectionDefined(Terms)) + { + writer.WritePropertyName("terms"u8); + writer.WriteStartArray(); + foreach (var item in Terms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Usage)) + { + writer.WritePropertyName("usage"u8); + writer.WriteStringValue(Usage); + } + if (Optional.IsCollectionDefined(CategoryInfo)) + { + writer.WritePropertyName("categoryInfo"u8); + writer.WriteStartObject(); + foreach (var item in CategoryInfo) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(TermInfo)) + { + writer.WritePropertyName("termInfo"u8); + writer.WriteStartObject(); + foreach (var item in TermInfo) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasGlossaryExtInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossaryExtInfo)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasGlossaryExtInfo(document.RootElement, options); + } + + internal static AtlasGlossaryExtInfo DeserializeAtlasGlossaryExtInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional guid = default; + Optional> classifications = default; + Optional longDescription = default; + Optional name = default; + Optional qualifiedName = default; + Optional shortDescription = default; + Optional lastModifiedTS = default; + Optional createTime = default; + Optional createdBy = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional> categories = default; + Optional language = default; + Optional> terms = default; + Optional usage = default; + Optional> categoryInfo = default; + Optional> termInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("classifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasClassification.DeserializeAtlasClassification(item)); + } + classifications = array; + continue; + } + if (property.NameEquals("longDescription"u8)) + { + longDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("qualifiedName"u8)) + { + qualifiedName = property.Value.GetString(); + continue; + } + if (property.NameEquals("shortDescription"u8)) + { + shortDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("categories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedCategoryHeader.DeserializeAtlasRelatedCategoryHeader(item)); + } + categories = array; + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("terms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + terms = array; + continue; + } + if (property.NameEquals("usage"u8)) + { + usage = property.Value.GetString(); + continue; + } + if (property.NameEquals("categoryInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, AtlasGlossaryCategory.DeserializeAtlasGlossaryCategory(property0.Value)); + } + categoryInfo = dictionary; + continue; + } + if (property.NameEquals("termInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, AtlasGlossaryTerm.DeserializeAtlasGlossaryTerm(property0.Value)); + } + termInfo = dictionary; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasGlossaryExtInfo(guid.Value, Optional.ToList(classifications), longDescription.Value, name.Value, qualifiedName.Value, shortDescription.Value, lastModifiedTS.Value, Optional.ToNullable(createTime), createdBy.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToList(categories), language.Value, Optional.ToList(terms), usage.Value, Optional.ToDictionary(categoryInfo), Optional.ToDictionary(termInfo), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasGlossaryExtInfo)} does not support '{options.Format}' format."); + } + } + + AtlasGlossaryExtInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasGlossaryExtInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasGlossaryExtInfo)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasGlossaryExtInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasGlossaryExtInfo(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryExtInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryExtInfo.cs new file mode 100644 index 0000000000000..dec3bea21a9f5 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryExtInfo.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The extended information of glossary. + public partial class AtlasGlossaryExtInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AtlasGlossaryExtInfo() + { + Classifications = new ChangeTrackingList(); + Categories = new ChangeTrackingList(); + Terms = new ChangeTrackingList(); + CategoryInfo = new ChangeTrackingDictionary(); + TermInfo = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The GUID of the object. + /// An array of classifications. + /// The long version description. + /// The name of the glossary object. + /// The qualified name of the glossary object. + /// The short version of description. + /// ETag for concurrency control. + /// The created time of the record. + /// The user who created the record. + /// The update time of the record. + /// The user who updated the record. + /// An array of categories. + /// The language of the glossary. + /// An array of related term headers. + /// The usage of the glossary. + /// The glossary category information. + /// The glossary term information. + /// Keeps track of any properties unknown to the library. + internal AtlasGlossaryExtInfo(string guid, IReadOnlyList classifications, string longDescription, string name, string qualifiedName, string shortDescription, string lastModifiedTS, long? createTime, string createdBy, long? updateTime, string updatedBy, IReadOnlyList categories, string language, IReadOnlyList terms, string usage, IReadOnlyDictionary categoryInfo, IReadOnlyDictionary termInfo, IDictionary serializedAdditionalRawData) + { + Guid = guid; + Classifications = classifications; + LongDescription = longDescription; + Name = name; + QualifiedName = qualifiedName; + ShortDescription = shortDescription; + LastModifiedTS = lastModifiedTS; + CreateTime = createTime; + CreatedBy = createdBy; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Categories = categories; + Language = language; + Terms = terms; + Usage = usage; + CategoryInfo = categoryInfo; + TermInfo = termInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the object. + public string Guid { get; } + /// An array of classifications. + public IReadOnlyList Classifications { get; } + /// The long version description. + public string LongDescription { get; } + /// The name of the glossary object. + public string Name { get; } + /// The qualified name of the glossary object. + public string QualifiedName { get; } + /// The short version of description. + public string ShortDescription { get; } + /// ETag for concurrency control. + public string LastModifiedTS { get; } + /// The created time of the record. + public long? CreateTime { get; } + /// The user who created the record. + public string CreatedBy { get; } + /// The update time of the record. + public long? UpdateTime { get; } + /// The user who updated the record. + public string UpdatedBy { get; } + /// An array of categories. + public IReadOnlyList Categories { get; } + /// The language of the glossary. + public string Language { get; } + /// An array of related term headers. + public IReadOnlyList Terms { get; } + /// The usage of the glossary. + public string Usage { get; } + /// The glossary category information. + public IReadOnlyDictionary CategoryInfo { get; } + /// The glossary term information. + public IReadOnlyDictionary TermInfo { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryHeader.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryHeader.Serialization.cs new file mode 100644 index 0000000000000..5036889662f26 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryHeader.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasGlossaryHeader : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossaryHeader)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayText)) + { + writer.WritePropertyName("displayText"u8); + writer.WriteStringValue(DisplayText); + } + if (Optional.IsDefined(GlossaryGuid)) + { + writer.WritePropertyName("glossaryGuid"u8); + writer.WriteStringValue(GlossaryGuid); + } + if (Optional.IsDefined(RelationGuid)) + { + writer.WritePropertyName("relationGuid"u8); + writer.WriteStringValue(RelationGuid); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasGlossaryHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossaryHeader)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasGlossaryHeader(document.RootElement, options); + } + + internal static AtlasGlossaryHeader DeserializeAtlasGlossaryHeader(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional displayText = default; + Optional glossaryGuid = default; + Optional relationGuid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayText"u8)) + { + displayText = property.Value.GetString(); + continue; + } + if (property.NameEquals("glossaryGuid"u8)) + { + glossaryGuid = property.Value.GetString(); + continue; + } + if (property.NameEquals("relationGuid"u8)) + { + relationGuid = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasGlossaryHeader(displayText.Value, glossaryGuid.Value, relationGuid.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasGlossaryHeader)} does not support '{options.Format}' format."); + } + } + + AtlasGlossaryHeader IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasGlossaryHeader(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasGlossaryHeader)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasGlossaryHeader FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasGlossaryHeader(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryHeader.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryHeader.cs new file mode 100644 index 0000000000000..1a0e56a9235b2 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryHeader.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The glossary header with basic information. + public partial class AtlasGlossaryHeader + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasGlossaryHeader() + { + } + + /// Initializes a new instance of . + /// The display text. + /// The GUID of the glossary. + /// The GUID of the relationship. + /// Keeps track of any properties unknown to the library. + internal AtlasGlossaryHeader(string displayText, string glossaryGuid, string relationGuid, IDictionary serializedAdditionalRawData) + { + DisplayText = displayText; + GlossaryGuid = glossaryGuid; + RelationGuid = relationGuid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The display text. + public string DisplayText { get; set; } + /// The GUID of the glossary. + public string GlossaryGuid { get; set; } + /// The GUID of the relationship. + public string RelationGuid { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryTerm.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryTerm.Serialization.cs new file mode 100644 index 0000000000000..29985040bfb37 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryTerm.Serialization.cs @@ -0,0 +1,944 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasGlossaryTerm : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossaryTerm)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsCollectionDefined(Classifications)) + { + writer.WritePropertyName("classifications"u8); + writer.WriteStartArray(); + foreach (var item in Classifications) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LongDescription)) + { + writer.WritePropertyName("longDescription"u8); + writer.WriteStringValue(LongDescription); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(QualifiedName)) + { + writer.WritePropertyName("qualifiedName"u8); + writer.WriteStringValue(QualifiedName); + } + if (Optional.IsDefined(ShortDescription)) + { + writer.WritePropertyName("shortDescription"u8); + writer.WriteStringValue(ShortDescription); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Abbreviation)) + { + writer.WritePropertyName("abbreviation"u8); + writer.WriteStringValue(Abbreviation); + } + if (Optional.IsCollectionDefined(TemplateName)) + { + writer.WritePropertyName("templateName"u8); + writer.WriteStartArray(); + foreach (var item in TemplateName) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item); +#else + using (JsonDocument document = JsonDocument.Parse(item)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Anchor)) + { + writer.WritePropertyName("anchor"u8); + writer.WriteObjectValue(Anchor); + } + if (Optional.IsCollectionDefined(Antonyms)) + { + writer.WritePropertyName("antonyms"u8); + writer.WriteStartArray(); + foreach (var item in Antonyms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(NickName)) + { + writer.WritePropertyName("nickName"u8); + writer.WriteStringValue(NickName); + } + if (Optional.IsCollectionDefined(HierarchyInfo)) + { + writer.WritePropertyName("hierarchyInfo"u8); + writer.WriteStartArray(); + foreach (var item in HierarchyInfo) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteStartArray(); + foreach (var item in Resources) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Contacts)) + { + writer.WritePropertyName("contacts"u8); + writer.WriteStartObject(); + foreach (var item in Contacts) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartArray(); + foreach (var item0 in item.Value) + { + writer.WriteObjectValue(item0); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartObject(); + foreach (var item in Attributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartObject(); + foreach (var item0 in item.Value) + { + writer.WritePropertyName(item0.Key); + if (item0.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item0.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item0.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(AssignedEntities)) + { + writer.WritePropertyName("assignedEntities"u8); + writer.WriteStartArray(); + foreach (var item in AssignedEntities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Categories)) + { + writer.WritePropertyName("categories"u8); + writer.WriteStartArray(); + foreach (var item in Categories) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Classifies)) + { + writer.WritePropertyName("classifies"u8); + writer.WriteStartArray(); + foreach (var item in Classifies) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Examples)) + { + writer.WritePropertyName("examples"u8); + writer.WriteStartArray(); + foreach (var item in Examples) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(IsA)) + { + writer.WritePropertyName("isA"u8); + writer.WriteStartArray(); + foreach (var item in IsA) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(PreferredTerms)) + { + writer.WritePropertyName("preferredTerms"u8); + writer.WriteStartArray(); + foreach (var item in PreferredTerms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(PreferredToTerms)) + { + writer.WritePropertyName("preferredToTerms"u8); + writer.WriteStartArray(); + foreach (var item in PreferredToTerms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ReplacedBy)) + { + writer.WritePropertyName("replacedBy"u8); + writer.WriteStartArray(); + foreach (var item in ReplacedBy) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ReplacementTerms)) + { + writer.WritePropertyName("replacementTerms"u8); + writer.WriteStartArray(); + foreach (var item in ReplacementTerms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SeeAlso)) + { + writer.WritePropertyName("seeAlso"u8); + writer.WriteStartArray(); + foreach (var item in SeeAlso) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Synonyms)) + { + writer.WritePropertyName("synonyms"u8); + writer.WriteStartArray(); + foreach (var item in Synonyms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(TranslatedTerms)) + { + writer.WritePropertyName("translatedTerms"u8); + writer.WriteStartArray(); + foreach (var item in TranslatedTerms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(TranslationTerms)) + { + writer.WritePropertyName("translationTerms"u8); + writer.WriteStartArray(); + foreach (var item in TranslationTerms) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Usage)) + { + writer.WritePropertyName("usage"u8); + writer.WriteStringValue(Usage); + } + if (Optional.IsCollectionDefined(ValidValues)) + { + writer.WritePropertyName("validValues"u8); + writer.WriteStartArray(); + foreach (var item in ValidValues) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ValidValuesFor)) + { + writer.WritePropertyName("validValuesFor"u8); + writer.WriteStartArray(); + foreach (var item in ValidValuesFor) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasGlossaryTerm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasGlossaryTerm)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasGlossaryTerm(document.RootElement, options); + } + + internal static AtlasGlossaryTerm DeserializeAtlasGlossaryTerm(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional guid = default; + Optional> classifications = default; + Optional longDescription = default; + Optional name = default; + Optional qualifiedName = default; + Optional shortDescription = default; + Optional lastModifiedTS = default; + Optional createTime = default; + Optional createdBy = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional abbreviation = default; + Optional> templateName = default; + Optional anchor = default; + Optional> antonyms = default; + Optional status = default; + Optional nickName = default; + Optional> hierarchyInfo = default; + Optional> resources = default; + Optional>> contacts = default; + Optional>> attributes = default; + Optional> assignedEntities = default; + Optional> categories = default; + Optional> classifies = default; + Optional> examples = default; + Optional> isA = default; + Optional> preferredTerms = default; + Optional> preferredToTerms = default; + Optional> replacedBy = default; + Optional> replacementTerms = default; + Optional> seeAlso = default; + Optional> synonyms = default; + Optional> translatedTerms = default; + Optional> translationTerms = default; + Optional usage = default; + Optional> validValues = default; + Optional> validValuesFor = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("classifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasClassification.DeserializeAtlasClassification(item)); + } + classifications = array; + continue; + } + if (property.NameEquals("longDescription"u8)) + { + longDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("qualifiedName"u8)) + { + qualifiedName = property.Value.GetString(); + continue; + } + if (property.NameEquals("shortDescription"u8)) + { + shortDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("abbreviation"u8)) + { + abbreviation = property.Value.GetString(); + continue; + } + if (property.NameEquals("templateName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(BinaryData.FromString(item.GetRawText())); + } + } + templateName = array; + continue; + } + if (property.NameEquals("anchor"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + anchor = AtlasGlossaryHeader.DeserializeAtlasGlossaryHeader(property.Value); + continue; + } + if (property.NameEquals("antonyms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + antonyms = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new TermStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("nickName"u8)) + { + nickName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hierarchyInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PurviewObjectId.DeserializePurviewObjectId(item)); + } + hierarchyInfo = array; + continue; + } + if (property.NameEquals("resources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceLink.DeserializeResourceLink(item)); + } + resources = array; + continue; + } + if (property.NameEquals("contacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ContactInfo.DeserializeContactInfo(item)); + } + dictionary.Add(property0.Name, array); + } + } + contacts = dictionary; + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + Dictionary dictionary0 = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary0.Add(property1.Name, null); + } + else + { + dictionary0.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText())); + } + } + dictionary.Add(property0.Name, dictionary0); + } + } + attributes = dictionary; + continue; + } + if (property.NameEquals("assignedEntities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedObjectId.DeserializeAtlasRelatedObjectId(item)); + } + assignedEntities = array; + continue; + } + if (property.NameEquals("categories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasTermCategorizationHeader.DeserializeAtlasTermCategorizationHeader(item)); + } + categories = array; + continue; + } + if (property.NameEquals("classifies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + classifies = array; + continue; + } + if (property.NameEquals("examples"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + examples = array; + continue; + } + if (property.NameEquals("isA"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + isA = array; + continue; + } + if (property.NameEquals("preferredTerms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + preferredTerms = array; + continue; + } + if (property.NameEquals("preferredToTerms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + preferredToTerms = array; + continue; + } + if (property.NameEquals("replacedBy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + replacedBy = array; + continue; + } + if (property.NameEquals("replacementTerms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + replacementTerms = array; + continue; + } + if (property.NameEquals("seeAlso"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + seeAlso = array; + continue; + } + if (property.NameEquals("synonyms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + synonyms = array; + continue; + } + if (property.NameEquals("translatedTerms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + translatedTerms = array; + continue; + } + if (property.NameEquals("translationTerms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + translationTerms = array; + continue; + } + if (property.NameEquals("usage"u8)) + { + usage = property.Value.GetString(); + continue; + } + if (property.NameEquals("validValues"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + validValues = array; + continue; + } + if (property.NameEquals("validValuesFor"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + validValuesFor = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasGlossaryTerm(guid.Value, Optional.ToList(classifications), longDescription.Value, name.Value, qualifiedName.Value, shortDescription.Value, lastModifiedTS.Value, Optional.ToNullable(createTime), createdBy.Value, Optional.ToNullable(updateTime), updatedBy.Value, abbreviation.Value, Optional.ToList(templateName), anchor.Value, Optional.ToList(antonyms), Optional.ToNullable(status), nickName.Value, Optional.ToList(hierarchyInfo), Optional.ToList(resources), Optional.ToDictionary(contacts), Optional.ToDictionary(attributes), Optional.ToList(assignedEntities), Optional.ToList(categories), Optional.ToList(classifies), Optional.ToList(examples), Optional.ToList(isA), Optional.ToList(preferredTerms), Optional.ToList(preferredToTerms), Optional.ToList(replacedBy), Optional.ToList(replacementTerms), Optional.ToList(seeAlso), Optional.ToList(synonyms), Optional.ToList(translatedTerms), Optional.ToList(translationTerms), usage.Value, Optional.ToList(validValues), Optional.ToList(validValuesFor), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasGlossaryTerm)} does not support '{options.Format}' format."); + } + } + + AtlasGlossaryTerm IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasGlossaryTerm(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasGlossaryTerm)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasGlossaryTerm FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasGlossaryTerm(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryTerm.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryTerm.cs new file mode 100644 index 0000000000000..fe798ea6d5c5e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossaryTerm.cs @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The glossary term. + public partial class AtlasGlossaryTerm + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasGlossaryTerm() + { + Classifications = new ChangeTrackingList(); + TemplateName = new ChangeTrackingList(); + Antonyms = new ChangeTrackingList(); + HierarchyInfo = new ChangeTrackingList(); + Resources = new ChangeTrackingList(); + Contacts = new ChangeTrackingDictionary>(); + Attributes = new ChangeTrackingDictionary>(); + AssignedEntities = new ChangeTrackingList(); + Categories = new ChangeTrackingList(); + Classifies = new ChangeTrackingList(); + Examples = new ChangeTrackingList(); + IsA = new ChangeTrackingList(); + PreferredTerms = new ChangeTrackingList(); + PreferredToTerms = new ChangeTrackingList(); + ReplacedBy = new ChangeTrackingList(); + ReplacementTerms = new ChangeTrackingList(); + SeeAlso = new ChangeTrackingList(); + Synonyms = new ChangeTrackingList(); + TranslatedTerms = new ChangeTrackingList(); + TranslationTerms = new ChangeTrackingList(); + ValidValues = new ChangeTrackingList(); + ValidValuesFor = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The GUID of the object. + /// An array of classifications. + /// The long version description. + /// The name of the glossary object. + /// The qualified name of the glossary object. + /// The short version of description. + /// ETag for concurrency control. + /// The created time of the record. + /// The user who created the record. + /// The update time of the record. + /// The user who updated the record. + /// The abbreviation of the term. + /// The name of the template. + /// The glossary header with basic information. + /// An array of related term headers as antonyms. + /// Status of the AtlasGlossaryTerm. + /// The nick name of the term. + /// The hierarchy information of the term. + /// An array of resource link for term. + /// The dictionary of contacts for terms. Key could be Expert or Steward. + /// + /// The custom attributes of the term, which is map<string,map<string,object>>. + /// The + /// key of the first layer map is term template name. + /// + /// An array of related object IDs. + /// An array of term categorization headers. + /// An array of related term headers. + /// An array of examples. + /// An array of related term headers indicating the is-a relationship. + /// An array of preferred related term headers. + /// An array of related term headers that are preferred to. + /// An array of related term headers that are replaced by. + /// An array of related term headers for replacement. + /// An array of related term headers for see also. + /// An array of related term headers as synonyms. + /// An array of translated related term headers. + /// An array of related term headers for translation. + /// The usage of the term. + /// An array of related term headers as valid values. + /// An array of related term headers as valid values for other records. + /// Keeps track of any properties unknown to the library. + internal AtlasGlossaryTerm(string guid, IList classifications, string longDescription, string name, string qualifiedName, string shortDescription, string lastModifiedTS, long? createTime, string createdBy, long? updateTime, string updatedBy, string abbreviation, IList templateName, AtlasGlossaryHeader anchor, IList antonyms, TermStatus? status, string nickName, IList hierarchyInfo, IList resources, IDictionary> contacts, IDictionary> attributes, IList assignedEntities, IList categories, IList classifies, IList examples, IList isA, IList preferredTerms, IList preferredToTerms, IList replacedBy, IList replacementTerms, IList seeAlso, IList synonyms, IList translatedTerms, IList translationTerms, string usage, IList validValues, IList validValuesFor, IDictionary serializedAdditionalRawData) + { + Guid = guid; + Classifications = classifications; + LongDescription = longDescription; + Name = name; + QualifiedName = qualifiedName; + ShortDescription = shortDescription; + LastModifiedTS = lastModifiedTS; + CreateTime = createTime; + CreatedBy = createdBy; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Abbreviation = abbreviation; + TemplateName = templateName; + Anchor = anchor; + Antonyms = antonyms; + Status = status; + NickName = nickName; + HierarchyInfo = hierarchyInfo; + Resources = resources; + Contacts = contacts; + Attributes = attributes; + AssignedEntities = assignedEntities; + Categories = categories; + Classifies = classifies; + Examples = examples; + IsA = isA; + PreferredTerms = preferredTerms; + PreferredToTerms = preferredToTerms; + ReplacedBy = replacedBy; + ReplacementTerms = replacementTerms; + SeeAlso = seeAlso; + Synonyms = synonyms; + TranslatedTerms = translatedTerms; + TranslationTerms = translationTerms; + Usage = usage; + ValidValues = validValues; + ValidValuesFor = validValuesFor; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the object. + public string Guid { get; set; } + /// An array of classifications. + public IList Classifications { get; } + /// The long version description. + public string LongDescription { get; set; } + /// The name of the glossary object. + public string Name { get; set; } + /// The qualified name of the glossary object. + public string QualifiedName { get; set; } + /// The short version of description. + public string ShortDescription { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The abbreviation of the term. + public string Abbreviation { get; set; } + /// + /// The name of the template. + /// + /// To assign an object to the element of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IList TemplateName { get; } + /// The glossary header with basic information. + public AtlasGlossaryHeader Anchor { get; set; } + /// An array of related term headers as antonyms. + public IList Antonyms { get; } + /// Status of the AtlasGlossaryTerm. + public TermStatus? Status { get; set; } + /// The nick name of the term. + public string NickName { get; set; } + /// The hierarchy information of the term. + public IList HierarchyInfo { get; } + /// An array of resource link for term. + public IList Resources { get; } + /// The dictionary of contacts for terms. Key could be Expert or Steward. + public IDictionary> Contacts { get; } + /// + /// The custom attributes of the term, which is map<string,map<string,object>>. + /// The + /// key of the first layer map is term template name. + /// + public IDictionary> Attributes { get; } + /// An array of related object IDs. + public IList AssignedEntities { get; } + /// An array of term categorization headers. + public IList Categories { get; } + /// An array of related term headers. + public IList Classifies { get; } + /// An array of examples. + public IList Examples { get; } + /// An array of related term headers indicating the is-a relationship. + public IList IsA { get; } + /// An array of preferred related term headers. + public IList PreferredTerms { get; } + /// An array of related term headers that are preferred to. + public IList PreferredToTerms { get; } + /// An array of related term headers that are replaced by. + public IList ReplacedBy { get; } + /// An array of related term headers for replacement. + public IList ReplacementTerms { get; } + /// An array of related term headers for see also. + public IList SeeAlso { get; } + /// An array of related term headers as synonyms. + public IList Synonyms { get; } + /// An array of translated related term headers. + public IList TranslatedTerms { get; } + /// An array of related term headers for translation. + public IList TranslationTerms { get; } + /// The usage of the term. + public string Usage { get; set; } + /// An array of related term headers as valid values. + public IList ValidValues { get; } + /// An array of related term headers as valid values for other records. + public IList ValidValuesFor { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasLineageInfo.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasLineageInfo.Serialization.cs new file mode 100644 index 0000000000000..c6d84031a0fab --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasLineageInfo.Serialization.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasLineageInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasLineageInfo)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(BaseEntityGuid)) + { + writer.WritePropertyName("baseEntityGuid"u8); + writer.WriteStringValue(BaseEntityGuid); + } + if (Optional.IsCollectionDefined(GuidEntityMap)) + { + writer.WritePropertyName("guidEntityMap"u8); + writer.WriteStartObject(); + foreach (var item in GuidEntityMap) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(WidthCounts)) + { + writer.WritePropertyName("widthCounts"u8); + writer.WriteStartObject(); + foreach (var item in WidthCounts) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartObject(); + foreach (var item0 in item.Value) + { + writer.WritePropertyName(item0.Key); + if (item0.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item0.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item0.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(LineageDepth)) + { + writer.WritePropertyName("lineageDepth"u8); + writer.WriteNumberValue(LineageDepth.Value); + } + if (Optional.IsDefined(LineageWidth)) + { + writer.WritePropertyName("lineageWidth"u8); + writer.WriteNumberValue(LineageWidth.Value); + } + if (Optional.IsDefined(ChildrenCount)) + { + writer.WritePropertyName("childrenCount"u8); + writer.WriteNumberValue(ChildrenCount.Value); + } + if (Optional.IsDefined(LineageDirection)) + { + writer.WritePropertyName("lineageDirection"u8); + writer.WriteStringValue(LineageDirection.Value.ToString()); + } + if (Optional.IsCollectionDefined(ParentRelations)) + { + writer.WritePropertyName("parentRelations"u8); + writer.WriteStartArray(); + foreach (var item in ParentRelations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Relations)) + { + writer.WritePropertyName("relations"u8); + writer.WriteStartArray(); + foreach (var item in Relations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasLineageInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasLineageInfo)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasLineageInfo(document.RootElement, options); + } + + internal static AtlasLineageInfo DeserializeAtlasLineageInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional baseEntityGuid = default; + Optional> guidEntityMap = default; + Optional>> widthCounts = default; + Optional lineageDepth = default; + Optional lineageWidth = default; + Optional childrenCount = default; + Optional lineageDirection = default; + Optional> parentRelations = default; + Optional> relations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("baseEntityGuid"u8)) + { + baseEntityGuid = property.Value.GetString(); + continue; + } + if (property.NameEquals("guidEntityMap"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, AtlasEntityHeader.DeserializeAtlasEntityHeader(property0.Value)); + } + guidEntityMap = dictionary; + continue; + } + if (property.NameEquals("widthCounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + Dictionary dictionary0 = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary0.Add(property1.Name, null); + } + else + { + dictionary0.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText())); + } + } + dictionary.Add(property0.Name, dictionary0); + } + } + widthCounts = dictionary; + continue; + } + if (property.NameEquals("lineageDepth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lineageDepth = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("lineageWidth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lineageWidth = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("childrenCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + childrenCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("lineageDirection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lineageDirection = new LineageDirection(property.Value.GetString()); + continue; + } + if (property.NameEquals("parentRelations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ParentRelation.DeserializeParentRelation(item)); + } + parentRelations = array; + continue; + } + if (property.NameEquals("relations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LineageRelation.DeserializeLineageRelation(item)); + } + relations = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasLineageInfo(baseEntityGuid.Value, Optional.ToDictionary(guidEntityMap), Optional.ToDictionary(widthCounts), Optional.ToNullable(lineageDepth), Optional.ToNullable(lineageWidth), Optional.ToNullable(childrenCount), Optional.ToNullable(lineageDirection), Optional.ToList(parentRelations), Optional.ToList(relations), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasLineageInfo)} does not support '{options.Format}' format."); + } + } + + AtlasLineageInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasLineageInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasLineageInfo)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasLineageInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasLineageInfo(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasLineageInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasLineageInfo.cs new file mode 100644 index 0000000000000..b97f27c25f5f1 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasLineageInfo.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The lineage information. + public partial class AtlasLineageInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AtlasLineageInfo() + { + GuidEntityMap = new ChangeTrackingDictionary(); + WidthCounts = new ChangeTrackingDictionary>(); + ParentRelations = new ChangeTrackingList(); + Relations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The GUID of the base entity. + /// The GUID entity map. + /// The entity count in specific direction. + /// The depth of lineage. + /// The width of lineage. + /// The number of children node. + /// The enum of lineage direction. + /// An array of parentRelations relations. + /// An array of lineage relations. + /// Keeps track of any properties unknown to the library. + internal AtlasLineageInfo(string baseEntityGuid, IReadOnlyDictionary guidEntityMap, IReadOnlyDictionary> widthCounts, int? lineageDepth, int? lineageWidth, int? childrenCount, LineageDirection? lineageDirection, IReadOnlyList parentRelations, IReadOnlyList relations, IDictionary serializedAdditionalRawData) + { + BaseEntityGuid = baseEntityGuid; + GuidEntityMap = guidEntityMap; + WidthCounts = widthCounts; + LineageDepth = lineageDepth; + LineageWidth = lineageWidth; + ChildrenCount = childrenCount; + LineageDirection = lineageDirection; + ParentRelations = parentRelations; + Relations = relations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the base entity. + public string BaseEntityGuid { get; } + /// The GUID entity map. + public IReadOnlyDictionary GuidEntityMap { get; } + /// The entity count in specific direction. + public IReadOnlyDictionary> WidthCounts { get; } + /// The depth of lineage. + public int? LineageDepth { get; } + /// The width of lineage. + public int? LineageWidth { get; } + /// The number of children node. + public int? ChildrenCount { get; } + /// The enum of lineage direction. + public LineageDirection? LineageDirection { get; } + /// An array of parentRelations relations. + public IReadOnlyList ParentRelations { get; } + /// An array of lineage relations. + public IReadOnlyList Relations { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasNumberFormat.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasNumberFormat.Serialization.cs new file mode 100644 index 0000000000000..128010166151f --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasNumberFormat.Serialization.cs @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasNumberFormat : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasNumberFormat)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AvailableLocales)) + { + writer.WritePropertyName("availableLocales"u8); + writer.WriteStartArray(); + foreach (var item in AvailableLocales) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Currency)) + { + writer.WritePropertyName("currency"u8); + writer.WriteStringValue(Currency); + } + if (Optional.IsDefined(CurrencyInstance)) + { + writer.WritePropertyName("currencyInstance"u8); + writer.WriteObjectValue(CurrencyInstance); + } + if (Optional.IsDefined(GroupingUsed)) + { + writer.WritePropertyName("groupingUsed"u8); + writer.WriteBooleanValue(GroupingUsed.Value); + } + if (Optional.IsDefined(Instance)) + { + writer.WritePropertyName("instance"u8); + writer.WriteObjectValue(Instance); + } + if (Optional.IsDefined(IntegerInstance)) + { + writer.WritePropertyName("integerInstance"u8); + writer.WriteObjectValue(IntegerInstance); + } + if (Optional.IsDefined(MaximumFractionDigits)) + { + writer.WritePropertyName("maximumFractionDigits"u8); + writer.WriteNumberValue(MaximumFractionDigits.Value); + } + if (Optional.IsDefined(MaximumIntegerDigits)) + { + writer.WritePropertyName("maximumIntegerDigits"u8); + writer.WriteNumberValue(MaximumIntegerDigits.Value); + } + if (Optional.IsDefined(MinimumFractionDigits)) + { + writer.WritePropertyName("minimumFractionDigits"u8); + writer.WriteNumberValue(MinimumFractionDigits.Value); + } + if (Optional.IsDefined(MinimumIntegerDigits)) + { + writer.WritePropertyName("minimumIntegerDigits"u8); + writer.WriteNumberValue(MinimumIntegerDigits.Value); + } + if (Optional.IsDefined(NumberInstance)) + { + writer.WritePropertyName("numberInstance"u8); + writer.WriteObjectValue(NumberInstance); + } + if (Optional.IsDefined(ParseIntegerOnly)) + { + writer.WritePropertyName("parseIntegerOnly"u8); + writer.WriteBooleanValue(ParseIntegerOnly.Value); + } + if (Optional.IsDefined(PercentInstance)) + { + writer.WritePropertyName("percentInstance"u8); + writer.WriteObjectValue(PercentInstance); + } + if (Optional.IsDefined(RoundingMode)) + { + writer.WritePropertyName("roundingMode"u8); + writer.WriteStringValue(RoundingMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasNumberFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasNumberFormat)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasNumberFormat(document.RootElement, options); + } + + internal static AtlasNumberFormat DeserializeAtlasNumberFormat(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> availableLocales = default; + Optional currency = default; + Optional currencyInstance = default; + Optional groupingUsed = default; + Optional instance = default; + Optional integerInstance = default; + Optional maximumFractionDigits = default; + Optional maximumIntegerDigits = default; + Optional minimumFractionDigits = default; + Optional minimumIntegerDigits = default; + Optional numberInstance = default; + Optional parseIntegerOnly = default; + Optional percentInstance = default; + Optional roundingMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("availableLocales"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableLocales = array; + continue; + } + if (property.NameEquals("currency"u8)) + { + currency = property.Value.GetString(); + continue; + } + if (property.NameEquals("currencyInstance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currencyInstance = DeserializeAtlasNumberFormat(property.Value); + continue; + } + if (property.NameEquals("groupingUsed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + groupingUsed = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("instance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instance = DeserializeAtlasNumberFormat(property.Value); + continue; + } + if (property.NameEquals("integerInstance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + integerInstance = DeserializeAtlasNumberFormat(property.Value); + continue; + } + if (property.NameEquals("maximumFractionDigits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumFractionDigits = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maximumIntegerDigits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumIntegerDigits = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minimumFractionDigits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumFractionDigits = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minimumIntegerDigits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumIntegerDigits = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numberInstance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberInstance = DeserializeAtlasNumberFormat(property.Value); + continue; + } + if (property.NameEquals("parseIntegerOnly"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parseIntegerOnly = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("percentInstance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentInstance = DeserializeAtlasNumberFormat(property.Value); + continue; + } + if (property.NameEquals("roundingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + roundingMode = new RoundingMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasNumberFormat(Optional.ToList(availableLocales), currency.Value, currencyInstance.Value, Optional.ToNullable(groupingUsed), instance.Value, integerInstance.Value, Optional.ToNullable(maximumFractionDigits), Optional.ToNullable(maximumIntegerDigits), Optional.ToNullable(minimumFractionDigits), Optional.ToNullable(minimumIntegerDigits), numberInstance.Value, Optional.ToNullable(parseIntegerOnly), percentInstance.Value, Optional.ToNullable(roundingMode), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasNumberFormat)} does not support '{options.Format}' format."); + } + } + + AtlasNumberFormat IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasNumberFormat(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasNumberFormat)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasNumberFormat FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasNumberFormat(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasNumberFormat.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasNumberFormat.cs new file mode 100644 index 0000000000000..0f1e6ffdc5e5f --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasNumberFormat.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The number format. + public partial class AtlasNumberFormat + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasNumberFormat() + { + AvailableLocales = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The number format. + /// The currency. + /// The number format. + /// Determines if grouping is used. + /// The number format. + /// The number format. + /// The maximum of fraction digits. + /// The maximum of integer digits. + /// The minimum of fraction digits. + /// The minimum of integer digits. + /// The number format. + /// Determines if only integer is parsed. + /// The number format. + /// The enum of rounding mode. + /// Keeps track of any properties unknown to the library. + internal AtlasNumberFormat(IList availableLocales, string currency, AtlasNumberFormat currencyInstance, bool? groupingUsed, AtlasNumberFormat instance, AtlasNumberFormat integerInstance, int? maximumFractionDigits, int? maximumIntegerDigits, int? minimumFractionDigits, int? minimumIntegerDigits, AtlasNumberFormat numberInstance, bool? parseIntegerOnly, AtlasNumberFormat percentInstance, RoundingMode? roundingMode, IDictionary serializedAdditionalRawData) + { + AvailableLocales = availableLocales; + Currency = currency; + CurrencyInstance = currencyInstance; + GroupingUsed = groupingUsed; + Instance = instance; + IntegerInstance = integerInstance; + MaximumFractionDigits = maximumFractionDigits; + MaximumIntegerDigits = maximumIntegerDigits; + MinimumFractionDigits = minimumFractionDigits; + MinimumIntegerDigits = minimumIntegerDigits; + NumberInstance = numberInstance; + ParseIntegerOnly = parseIntegerOnly; + PercentInstance = percentInstance; + RoundingMode = roundingMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The number format. + public IList AvailableLocales { get; } + /// The currency. + public string Currency { get; set; } + /// The number format. + public AtlasNumberFormat CurrencyInstance { get; set; } + /// Determines if grouping is used. + public bool? GroupingUsed { get; set; } + /// The number format. + public AtlasNumberFormat Instance { get; set; } + /// The number format. + public AtlasNumberFormat IntegerInstance { get; set; } + /// The maximum of fraction digits. + public int? MaximumFractionDigits { get; set; } + /// The maximum of integer digits. + public int? MaximumIntegerDigits { get; set; } + /// The minimum of fraction digits. + public int? MinimumFractionDigits { get; set; } + /// The minimum of integer digits. + public int? MinimumIntegerDigits { get; set; } + /// The number format. + public AtlasNumberFormat NumberInstance { get; set; } + /// Determines if only integer is parsed. + public bool? ParseIntegerOnly { get; set; } + /// The number format. + public AtlasNumberFormat PercentInstance { get; set; } + /// The enum of rounding mode. + public RoundingMode? RoundingMode { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasObjectId.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasObjectId.Serialization.cs new file mode 100644 index 0000000000000..721f0d32bdf5e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasObjectId.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasObjectId : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasObjectId)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsCollectionDefined(UniqueAttributes)) + { + writer.WritePropertyName("uniqueAttributes"u8); + writer.WriteStartObject(); + foreach (var item in UniqueAttributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasObjectId IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasObjectId)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasObjectId(document.RootElement, options); + } + + internal static AtlasObjectId DeserializeAtlasObjectId(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional guid = default; + Optional typeName = default; + Optional> uniqueAttributes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("uniqueAttributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + uniqueAttributes = dictionary; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasObjectId(guid.Value, typeName.Value, Optional.ToDictionary(uniqueAttributes), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasObjectId)} does not support '{options.Format}' format."); + } + } + + AtlasObjectId IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasObjectId(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasObjectId)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasObjectId FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasObjectId(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasObjectId.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasObjectId.cs new file mode 100644 index 0000000000000..93f9561d95f9b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasObjectId.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Reference to an object-instance of a type - like entity. + public partial class AtlasObjectId + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasObjectId() + { + UniqueAttributes = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The GUID of the object. + /// The name of the type. + /// The unique attributes of the object. + /// Keeps track of any properties unknown to the library. + internal AtlasObjectId(string guid, string typeName, IDictionary uniqueAttributes, IDictionary serializedAdditionalRawData) + { + Guid = guid; + TypeName = typeName; + UniqueAttributes = uniqueAttributes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the object. + public string Guid { get; set; } + /// The name of the type. + public string TypeName { get; set; } + /// + /// The unique attributes of the object. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary UniqueAttributes { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedCategoryHeader.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedCategoryHeader.Serialization.cs new file mode 100644 index 0000000000000..26dde6bcac2f0 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedCategoryHeader.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasRelatedCategoryHeader : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelatedCategoryHeader)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(CategoryGuid)) + { + writer.WritePropertyName("categoryGuid"u8); + writer.WriteStringValue(CategoryGuid); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(DisplayText)) + { + writer.WritePropertyName("displayText"u8); + writer.WriteStringValue(DisplayText); + } + if (Optional.IsDefined(ParentCategoryGuid)) + { + writer.WritePropertyName("parentCategoryGuid"u8); + writer.WriteStringValue(ParentCategoryGuid); + } + if (Optional.IsDefined(RelationGuid)) + { + writer.WritePropertyName("relationGuid"u8); + writer.WriteStringValue(RelationGuid); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasRelatedCategoryHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelatedCategoryHeader)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasRelatedCategoryHeader(document.RootElement, options); + } + + internal static AtlasRelatedCategoryHeader DeserializeAtlasRelatedCategoryHeader(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional categoryGuid = default; + Optional description = default; + Optional displayText = default; + Optional parentCategoryGuid = default; + Optional relationGuid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("categoryGuid"u8)) + { + categoryGuid = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayText"u8)) + { + displayText = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentCategoryGuid"u8)) + { + parentCategoryGuid = property.Value.GetString(); + continue; + } + if (property.NameEquals("relationGuid"u8)) + { + relationGuid = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasRelatedCategoryHeader(categoryGuid.Value, description.Value, displayText.Value, parentCategoryGuid.Value, relationGuid.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasRelatedCategoryHeader)} does not support '{options.Format}' format."); + } + } + + AtlasRelatedCategoryHeader IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasRelatedCategoryHeader(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasRelatedCategoryHeader)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasRelatedCategoryHeader FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasRelatedCategoryHeader(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedCategoryHeader.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedCategoryHeader.cs new file mode 100644 index 0000000000000..bba9400a67ca7 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedCategoryHeader.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The header of the related category. + public partial class AtlasRelatedCategoryHeader + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasRelatedCategoryHeader() + { + } + + /// Initializes a new instance of . + /// The GUID of the category. + /// The description of the category header. + /// The display text. + /// The GUID of the parent category. + /// The GUID of the relationship. + /// Keeps track of any properties unknown to the library. + internal AtlasRelatedCategoryHeader(string categoryGuid, string description, string displayText, string parentCategoryGuid, string relationGuid, IDictionary serializedAdditionalRawData) + { + CategoryGuid = categoryGuid; + Description = description; + DisplayText = displayText; + ParentCategoryGuid = parentCategoryGuid; + RelationGuid = relationGuid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the category. + public string CategoryGuid { get; set; } + /// The description of the category header. + public string Description { get; set; } + /// The display text. + public string DisplayText { get; set; } + /// The GUID of the parent category. + public string ParentCategoryGuid { get; set; } + /// The GUID of the relationship. + public string RelationGuid { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedObjectId.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedObjectId.Serialization.cs new file mode 100644 index 0000000000000..a00578a2167f2 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedObjectId.Serialization.cs @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasRelatedObjectId : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelatedObjectId)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsCollectionDefined(UniqueAttributes)) + { + writer.WritePropertyName("uniqueAttributes"u8); + writer.WriteStartObject(); + foreach (var item in UniqueAttributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(DisplayText)) + { + writer.WritePropertyName("displayText"u8); + writer.WriteStringValue(DisplayText); + } + if (Optional.IsDefined(EntityStatus)) + { + writer.WritePropertyName("entityStatus"u8); + writer.WriteStringValue(EntityStatus.Value.ToString()); + } + if (Optional.IsDefined(RelationshipType)) + { + writer.WritePropertyName("relationshipType"u8); + writer.WriteStringValue(RelationshipType); + } + if (Optional.IsDefined(RelationshipAttributes)) + { + writer.WritePropertyName("relationshipAttributes"u8); + writer.WriteObjectValue(RelationshipAttributes); + } + if (Optional.IsDefined(RelationshipGuid)) + { + writer.WritePropertyName("relationshipGuid"u8); + writer.WriteStringValue(RelationshipGuid.Value); + } + if (Optional.IsDefined(RelationshipStatus)) + { + writer.WritePropertyName("relationshipStatus"u8); + writer.WriteStringValue(RelationshipStatus.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasRelatedObjectId IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelatedObjectId)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasRelatedObjectId(document.RootElement, options); + } + + internal static AtlasRelatedObjectId DeserializeAtlasRelatedObjectId(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional guid = default; + Optional typeName = default; + Optional> uniqueAttributes = default; + Optional displayText = default; + Optional entityStatus = default; + Optional relationshipType = default; + Optional relationshipAttributes = default; + Optional relationshipGuid = default; + Optional relationshipStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("uniqueAttributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + uniqueAttributes = dictionary; + continue; + } + if (property.NameEquals("displayText"u8)) + { + displayText = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + entityStatus = new EntityStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("relationshipType"u8)) + { + relationshipType = property.Value.GetString(); + continue; + } + if (property.NameEquals("relationshipAttributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationshipAttributes = AtlasStruct.DeserializeAtlasStruct(property.Value); + continue; + } + if (property.NameEquals("relationshipGuid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationshipGuid = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("relationshipStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationshipStatus = new StatusAtlasRelationship(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasRelatedObjectId(guid.Value, typeName.Value, Optional.ToDictionary(uniqueAttributes), displayText.Value, Optional.ToNullable(entityStatus), relationshipType.Value, relationshipAttributes.Value, Optional.ToNullable(relationshipGuid), Optional.ToNullable(relationshipStatus), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasRelatedObjectId)} does not support '{options.Format}' format."); + } + } + + AtlasRelatedObjectId IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasRelatedObjectId(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasRelatedObjectId)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasRelatedObjectId FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasRelatedObjectId(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedObjectId.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedObjectId.cs new file mode 100644 index 0000000000000..2009b4c6b8c76 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedObjectId.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// Reference to an object-instance of AtlasEntity type used in relationship + /// attribute values + /// + public partial class AtlasRelatedObjectId + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasRelatedObjectId() + { + UniqueAttributes = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The GUID of the object. + /// The name of the type. + /// The unique attributes of the object. + /// The display text. + /// + /// Status of the entity - can be active or deleted. Deleted entities are not + /// removed. + /// + /// Relationship type. + /// + /// Captures details of struct contents. Not instantiated directly, used only via + /// AtlasEntity, AtlasClassification. + /// + /// The GUID of the relationship. + /// The enum of relationship status. + /// Keeps track of any properties unknown to the library. + internal AtlasRelatedObjectId(string guid, string typeName, IDictionary uniqueAttributes, string displayText, EntityStatus? entityStatus, string relationshipType, AtlasStruct relationshipAttributes, Guid? relationshipGuid, StatusAtlasRelationship? relationshipStatus, IDictionary serializedAdditionalRawData) + { + Guid = guid; + TypeName = typeName; + UniqueAttributes = uniqueAttributes; + DisplayText = displayText; + EntityStatus = entityStatus; + RelationshipType = relationshipType; + RelationshipAttributes = relationshipAttributes; + RelationshipGuid = relationshipGuid; + RelationshipStatus = relationshipStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the object. + public string Guid { get; set; } + /// The name of the type. + public string TypeName { get; set; } + /// + /// The unique attributes of the object. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary UniqueAttributes { get; } + /// The display text. + public string DisplayText { get; set; } + /// + /// Status of the entity - can be active or deleted. Deleted entities are not + /// removed. + /// + public EntityStatus? EntityStatus { get; set; } + /// Relationship type. + public string RelationshipType { get; set; } + /// + /// Captures details of struct contents. Not instantiated directly, used only via + /// AtlasEntity, AtlasClassification. + /// + public AtlasStruct RelationshipAttributes { get; set; } + /// The GUID of the relationship. + public Guid? RelationshipGuid { get; set; } + /// The enum of relationship status. + public StatusAtlasRelationship? RelationshipStatus { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedTermHeader.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedTermHeader.Serialization.cs new file mode 100644 index 0000000000000..3af34fcc289cc --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedTermHeader.Serialization.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasRelatedTermHeader : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelatedTermHeader)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(DisplayText)) + { + writer.WritePropertyName("displayText"u8); + writer.WriteStringValue(DisplayText); + } + if (Optional.IsDefined(Expression)) + { + writer.WritePropertyName("expression"u8); + writer.WriteStringValue(Expression); + } + if (Optional.IsDefined(RelationGuid)) + { + writer.WritePropertyName("relationGuid"u8); + writer.WriteStringValue(RelationGuid); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Steward)) + { + writer.WritePropertyName("steward"u8); + writer.WriteStringValue(Steward); + } + if (Optional.IsDefined(TermGuid)) + { + writer.WritePropertyName("termGuid"u8); + writer.WriteStringValue(TermGuid); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasRelatedTermHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelatedTermHeader)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasRelatedTermHeader(document.RootElement, options); + } + + internal static AtlasRelatedTermHeader DeserializeAtlasRelatedTermHeader(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional description = default; + Optional displayText = default; + Optional expression = default; + Optional relationGuid = default; + Optional status = default; + Optional steward = default; + Optional termGuid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayText"u8)) + { + displayText = property.Value.GetString(); + continue; + } + if (property.NameEquals("expression"u8)) + { + expression = property.Value.GetString(); + continue; + } + if (property.NameEquals("relationGuid"u8)) + { + relationGuid = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new AtlasTermRelationshipStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("steward"u8)) + { + steward = property.Value.GetString(); + continue; + } + if (property.NameEquals("termGuid"u8)) + { + termGuid = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasRelatedTermHeader(description.Value, displayText.Value, expression.Value, relationGuid.Value, Optional.ToNullable(status), steward.Value, termGuid.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasRelatedTermHeader)} does not support '{options.Format}' format."); + } + } + + AtlasRelatedTermHeader IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasRelatedTermHeader(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasRelatedTermHeader)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasRelatedTermHeader FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasRelatedTermHeader(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedTermHeader.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedTermHeader.cs new file mode 100644 index 0000000000000..70c30ef8b5f87 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelatedTermHeader.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The header of the related term. + public partial class AtlasRelatedTermHeader + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasRelatedTermHeader() + { + } + + /// Initializes a new instance of . + /// The description of the related term. + /// The display text. + /// The expression of the term. + /// The GUID of the relationship. + /// The status of term relationship. + /// The steward of the term. + /// The GUID of the term. + /// Keeps track of any properties unknown to the library. + internal AtlasRelatedTermHeader(string description, string displayText, string expression, string relationGuid, AtlasTermRelationshipStatus? status, string steward, string termGuid, IDictionary serializedAdditionalRawData) + { + Description = description; + DisplayText = displayText; + Expression = expression; + RelationGuid = relationGuid; + Status = status; + Steward = steward; + TermGuid = termGuid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The description of the related term. + public string Description { get; set; } + /// The display text. + public string DisplayText { get; set; } + /// The expression of the term. + public string Expression { get; set; } + /// The GUID of the relationship. + public string RelationGuid { get; set; } + /// The status of term relationship. + public AtlasTermRelationshipStatus? Status { get; set; } + /// The steward of the term. + public string Steward { get; set; } + /// The GUID of the term. + public string TermGuid { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.Serialization.cs new file mode 100644 index 0000000000000..76c96d9d487bb --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.Serialization.cs @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasRelationship : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationship)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartObject(); + foreach (var item in Attributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(End1)) + { + writer.WritePropertyName("end1"u8); + writer.WriteObjectValue(End1); + } + if (Optional.IsDefined(End2)) + { + writer.WritePropertyName("end2"u8); + writer.WriteObjectValue(End2); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(HomeId)) + { + writer.WritePropertyName("homeId"u8); + writer.WriteStringValue(HomeId); + } + if (Optional.IsDefined(Label)) + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + if (Optional.IsDefined(ProvenanceType)) + { + writer.WritePropertyName("provenanceType"u8); + writer.WriteNumberValue(ProvenanceType.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasRelationship IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationship)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasRelationship(document.RootElement, options); + } + + internal static AtlasRelationship DeserializeAtlasRelationship(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> attributes = default; + Optional typeName = default; + Optional lastModifiedTS = default; + Optional createTime = default; + Optional createdBy = default; + Optional end1 = default; + Optional end2 = default; + Optional guid = default; + Optional homeId = default; + Optional label = default; + Optional provenanceType = default; + Optional status = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + attributes = dictionary; + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("end1"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + end1 = AtlasObjectId.DeserializeAtlasObjectId(property.Value); + continue; + } + if (property.NameEquals("end2"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + end2 = AtlasObjectId.DeserializeAtlasObjectId(property.Value); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("homeId"u8)) + { + homeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("provenanceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provenanceType = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new StatusAtlasRelationship(property.Value.GetString()); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasRelationship(Optional.ToDictionary(attributes), typeName.Value, lastModifiedTS.Value, Optional.ToNullable(createTime), createdBy.Value, end1.Value, end2.Value, guid.Value, homeId.Value, label.Value, Optional.ToNullable(provenanceType), Optional.ToNullable(status), Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasRelationship)} does not support '{options.Format}' format."); + } + } + + AtlasRelationship IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasRelationship(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasRelationship)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasRelationship FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasRelationship(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.cs new file mode 100644 index 0000000000000..1bd6dbad667aa --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Atlas relationship instance. + public partial class AtlasRelationship + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasRelationship() + { + Attributes = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The attributes of the struct. + /// The name of the type. + /// ETag for concurrency control. + /// The created time of the record. + /// The user who created the record. + /// Reference to an object-instance of a type - like entity. + /// Reference to an object-instance of a type - like entity. + /// The GUID of the relationship. + /// The home ID of the relationship. + /// The label of the relationship. + /// Used to record the provenance of an instance of an entity or relationship. + /// The enum of relationship status. + /// The update time of the record. + /// The user who updated the record. + /// The version of the relationship. + /// Keeps track of any properties unknown to the library. + internal AtlasRelationship(IDictionary attributes, string typeName, string lastModifiedTS, long? createTime, string createdBy, AtlasObjectId end1, AtlasObjectId end2, string guid, string homeId, string label, int? provenanceType, StatusAtlasRelationship? status, long? updateTime, string updatedBy, long? version, IDictionary serializedAdditionalRawData) + { + Attributes = attributes; + TypeName = typeName; + LastModifiedTS = lastModifiedTS; + CreateTime = createTime; + CreatedBy = createdBy; + End1 = end1; + End2 = end2; + Guid = guid; + HomeId = homeId; + Label = label; + ProvenanceType = provenanceType; + Status = status; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The attributes of the struct. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary Attributes { get; } + /// The name of the type. + public string TypeName { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// Reference to an object-instance of a type - like entity. + public AtlasObjectId End1 { get; set; } + /// Reference to an object-instance of a type - like entity. + public AtlasObjectId End2 { get; set; } + /// The GUID of the relationship. + public string Guid { get; set; } + /// The home ID of the relationship. + public string HomeId { get; set; } + /// The label of the relationship. + public string Label { get; set; } + /// Used to record the provenance of an instance of an entity or relationship. + public int? ProvenanceType { get; set; } + /// The enum of relationship status. + public StatusAtlasRelationship? Status { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The version of the relationship. + public long? Version { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipAttributeDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipAttributeDef.Serialization.cs new file mode 100644 index 0000000000000..ee2f16b8760ca --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipAttributeDef.Serialization.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasRelationshipAttributeDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationshipAttributeDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Cardinality)) + { + writer.WritePropertyName("cardinality"u8); + writer.WriteStringValue(Cardinality.Value.ToString()); + } + if (Optional.IsCollectionDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteStartArray(); + foreach (var item in Constraints) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DefaultValue)) + { + writer.WritePropertyName("defaultValue"u8); + writer.WriteStringValue(DefaultValue); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(IncludeInNotification)) + { + writer.WritePropertyName("includeInNotification"u8); + writer.WriteBooleanValue(IncludeInNotification.Value); + } + if (Optional.IsDefined(IsIndexable)) + { + writer.WritePropertyName("isIndexable"u8); + writer.WriteBooleanValue(IsIndexable.Value); + } + if (Optional.IsDefined(IsOptional)) + { + writer.WritePropertyName("isOptional"u8); + writer.WriteBooleanValue(IsOptional.Value); + } + if (Optional.IsDefined(IsUnique)) + { + writer.WritePropertyName("isUnique"u8); + writer.WriteBooleanValue(IsUnique.Value); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsDefined(ValuesMaxCount)) + { + writer.WritePropertyName("valuesMaxCount"u8); + writer.WriteNumberValue(ValuesMaxCount.Value); + } + if (Optional.IsDefined(ValuesMinCount)) + { + writer.WritePropertyName("valuesMinCount"u8); + writer.WriteNumberValue(ValuesMinCount.Value); + } + if (Optional.IsDefined(IsLegacyAttribute)) + { + writer.WritePropertyName("isLegacyAttribute"u8); + writer.WriteBooleanValue(IsLegacyAttribute.Value); + } + if (Optional.IsDefined(RelationshipTypeName)) + { + writer.WritePropertyName("relationshipTypeName"u8); + writer.WriteStringValue(RelationshipTypeName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasRelationshipAttributeDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationshipAttributeDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasRelationshipAttributeDef(document.RootElement, options); + } + + internal static AtlasRelationshipAttributeDef DeserializeAtlasRelationshipAttributeDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional cardinality = default; + Optional> constraints = default; + Optional defaultValue = default; + Optional description = default; + Optional includeInNotification = default; + Optional isIndexable = default; + Optional isOptional = default; + Optional isUnique = default; + Optional name = default; + Optional> options0 = default; + Optional typeName = default; + Optional valuesMaxCount = default; + Optional valuesMinCount = default; + Optional isLegacyAttribute = default; + Optional relationshipTypeName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cardinality"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cardinality = new CardinalityValue(property.Value.GetString()); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasConstraintDef.DeserializeAtlasConstraintDef(item)); + } + constraints = array; + continue; + } + if (property.NameEquals("defaultValue"u8)) + { + defaultValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("includeInNotification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + includeInNotification = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isIndexable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isIndexable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isOptional"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isOptional = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isUnique"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isUnique = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("valuesMaxCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valuesMaxCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("valuesMinCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + valuesMinCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isLegacyAttribute"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLegacyAttribute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("relationshipTypeName"u8)) + { + relationshipTypeName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasRelationshipAttributeDef(Optional.ToNullable(cardinality), Optional.ToList(constraints), defaultValue.Value, description.Value, Optional.ToNullable(includeInNotification), Optional.ToNullable(isIndexable), Optional.ToNullable(isOptional), Optional.ToNullable(isUnique), name.Value, Optional.ToDictionary(options0), typeName.Value, Optional.ToNullable(valuesMaxCount), Optional.ToNullable(valuesMinCount), Optional.ToNullable(isLegacyAttribute), relationshipTypeName.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasRelationshipAttributeDef)} does not support '{options.Format}' format."); + } + } + + AtlasRelationshipAttributeDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasRelationshipAttributeDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasRelationshipAttributeDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasRelationshipAttributeDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasRelationshipAttributeDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipAttributeDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipAttributeDef.cs new file mode 100644 index 0000000000000..5fa5a131bf0b1 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipAttributeDef.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + public partial class AtlasRelationshipAttributeDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasRelationshipAttributeDef() + { + Constraints = new ChangeTrackingList(); + Options = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// single-valued attribute or multi-valued attribute. + /// An array of constraints. + /// The default value of the attribute. + /// The description of the attribute. + /// Determines if it is included in notification. + /// Determines if it is indexable. + /// Determines if it is optional. + /// Determines if it unique. + /// The name of the attribute. + /// The options for the attribute. + /// The name of the type. + /// The maximum count of the values. + /// The minimum count of the values. + /// Determines if it is a legacy attribute. + /// The name of the relationship type. + /// Keeps track of any properties unknown to the library. + internal AtlasRelationshipAttributeDef(CardinalityValue? cardinality, IList constraints, string defaultValue, string description, bool? includeInNotification, bool? isIndexable, bool? isOptional, bool? isUnique, string name, IDictionary options, string typeName, int? valuesMaxCount, int? valuesMinCount, bool? isLegacyAttribute, string relationshipTypeName, IDictionary serializedAdditionalRawData) + { + Cardinality = cardinality; + Constraints = constraints; + DefaultValue = defaultValue; + Description = description; + IncludeInNotification = includeInNotification; + IsIndexable = isIndexable; + IsOptional = isOptional; + IsUnique = isUnique; + Name = name; + Options = options; + TypeName = typeName; + ValuesMaxCount = valuesMaxCount; + ValuesMinCount = valuesMinCount; + IsLegacyAttribute = isLegacyAttribute; + RelationshipTypeName = relationshipTypeName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// single-valued attribute or multi-valued attribute. + public CardinalityValue? Cardinality { get; set; } + /// An array of constraints. + public IList Constraints { get; } + /// The default value of the attribute. + public string DefaultValue { get; set; } + /// The description of the attribute. + public string Description { get; set; } + /// Determines if it is included in notification. + public bool? IncludeInNotification { get; set; } + /// Determines if it is indexable. + public bool? IsIndexable { get; set; } + /// Determines if it is optional. + public bool? IsOptional { get; set; } + /// Determines if it unique. + public bool? IsUnique { get; set; } + /// The name of the attribute. + public string Name { get; set; } + /// The options for the attribute. + public IDictionary Options { get; } + /// The name of the type. + public string TypeName { get; set; } + /// The maximum count of the values. + public int? ValuesMaxCount { get; set; } + /// The minimum count of the values. + public int? ValuesMinCount { get; set; } + /// Determines if it is a legacy attribute. + public bool? IsLegacyAttribute { get; set; } + /// The name of the relationship type. + public string RelationshipTypeName { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipDef.Serialization.cs new file mode 100644 index 0000000000000..509e10af1b568 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipDef.Serialization.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasRelationshipDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationshipDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(DateFormatter)) + { + writer.WritePropertyName("dateFormatter"u8); + writer.WriteObjectValue(DateFormatter); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ServiceType)) + { + writer.WritePropertyName("serviceType"u8); + writer.WriteStringValue(ServiceType); + } + if (Optional.IsDefined(TypeVersion)) + { + writer.WritePropertyName("typeVersion"u8); + writer.WriteStringValue(TypeVersion); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsCollectionDefined(AttributeDefs)) + { + writer.WritePropertyName("attributeDefs"u8); + writer.WriteStartArray(); + foreach (var item in AttributeDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(EndDef1)) + { + writer.WritePropertyName("endDef1"u8); + writer.WriteObjectValue(EndDef1); + } + if (Optional.IsDefined(EndDef2)) + { + writer.WritePropertyName("endDef2"u8); + writer.WriteObjectValue(EndDef2); + } + if (Optional.IsDefined(RelationshipCategory)) + { + writer.WritePropertyName("relationshipCategory"u8); + writer.WriteStringValue(RelationshipCategory.Value.ToString()); + } + if (Optional.IsDefined(RelationshipLabel)) + { + writer.WritePropertyName("relationshipLabel"u8); + writer.WriteStringValue(RelationshipLabel); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasRelationshipDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationshipDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasRelationshipDef(document.RootElement, options); + } + + internal static AtlasRelationshipDef DeserializeAtlasRelationshipDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional createTime = default; + Optional createdBy = default; + Optional dateFormatter = default; + Optional description = default; + Optional guid = default; + Optional name = default; + Optional> options0 = default; + Optional serviceType = default; + Optional typeVersion = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + Optional lastModifiedTS = default; + Optional> attributeDefs = default; + Optional endDef1 = default; + Optional endDef2 = default; + Optional relationshipCategory = default; + Optional relationshipLabel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("dateFormatter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateFormatter = AtlasDateFormat.DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("serviceType"u8)) + { + serviceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeVersion"u8)) + { + typeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("attributeDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasAttributeDef.DeserializeAtlasAttributeDef(item)); + } + attributeDefs = array; + continue; + } + if (property.NameEquals("endDef1"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDef1 = AtlasRelationshipEndDef.DeserializeAtlasRelationshipEndDef(property.Value); + continue; + } + if (property.NameEquals("endDef2"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDef2 = AtlasRelationshipEndDef.DeserializeAtlasRelationshipEndDef(property.Value); + continue; + } + if (property.NameEquals("relationshipCategory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationshipCategory = new RelationshipCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("relationshipLabel"u8)) + { + relationshipLabel = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasRelationshipDef(Optional.ToNullable(category), Optional.ToNullable(createTime), createdBy.Value, dateFormatter.Value, description.Value, guid.Value, name.Value, Optional.ToDictionary(options0), serviceType.Value, typeVersion.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), lastModifiedTS.Value, Optional.ToList(attributeDefs), endDef1.Value, endDef2.Value, Optional.ToNullable(relationshipCategory), relationshipLabel.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasRelationshipDef)} does not support '{options.Format}' format."); + } + } + + AtlasRelationshipDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasRelationshipDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasRelationshipDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasRelationshipDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasRelationshipDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipDef.cs new file mode 100644 index 0000000000000..0465bed9be8f7 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipDef.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// AtlasRelationshipDef is a TypeDef that defines a relationship. + /// As with other typeDefs the AtlasRelationshipDef has a name. Once created the + /// RelationshipDef has a guid. + /// The name and the guid are the 2 ways that the + /// RelationshipDef is identified. + /// RelationshipDefs have 2 ends, each of which + /// specify cardinality, an EntityDef type name and name and optionally + /// whether the + /// end is a container. + /// RelationshipDefs can have AttributeDefs - though only + /// primitive types are allowed. + /// RelationshipDefs have a relationshipCategory + /// specifying the UML type of relationship required + /// The way EntityDefs and + /// RelationshipDefs are intended to be used is that EntityDefs will define + /// AttributeDefs these AttributeDefs + /// will not specify an EntityDef type name as + /// their types. + /// RelationshipDefs introduce new attributes to the entity + /// instances. For example + /// EntityDef A might have attributes attr1,attr2,attr3 + /// + /// EntityDef B might have attributes attr4,attr5,attr6 + /// RelationshipDef + /// AtoB might define 2 ends + /// + /// end1: type A, name attr7 + /// end2: type B, name attr8 + /// + /// When an instance of EntityDef A is created, it + /// will have attributes attr1,attr2,attr3,attr7 + /// When an instance of EntityDef + /// B is created, it will have attributes attr4,attr5,attr6,attr8 + /// + /// In this way + /// relationshipDefs can be authored separately from entityDefs and can inject + /// relationship attributes into + /// the entity instances + /// + public partial class AtlasRelationshipDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasRelationshipDef() + { + Options = new ChangeTrackingDictionary(); + AttributeDefs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The created time of the record. + /// The user who created the record. + /// The date format. + /// The description of the type definition. + /// The GUID of the type definition. + /// The name of the type definition. + /// The options for the type definition. + /// The service type. + /// The version of the type. + /// The update time of the record. + /// The user who updated the record. + /// The version of the record. + /// ETag for concurrency control. + /// An array of attribute definitions. + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + /// + /// The Relationship category determines the style of relationship around + /// containment and lifecycle. + /// UML terminology is used for the values. + /// ASSOCIATION is a relationship with no containment. + /// COMPOSITION and AGGREGATION are containment relationships. + /// The difference being in the lifecycles of the container and its children. + /// In the COMPOSITION case, the children cannot exist without the container. + /// For AGGREGATION, the life cycles of the container and children are totally independent. + /// + /// The label of the relationship. + /// Keeps track of any properties unknown to the library. + internal AtlasRelationshipDef(TypeCategory? category, long? createTime, string createdBy, AtlasDateFormat dateFormatter, string description, string guid, string name, IDictionary options, string serviceType, string typeVersion, long? updateTime, string updatedBy, long? version, string lastModifiedTS, IList attributeDefs, AtlasRelationshipEndDef endDef1, AtlasRelationshipEndDef endDef2, RelationshipCategory? relationshipCategory, string relationshipLabel, IDictionary serializedAdditionalRawData) + { + Category = category; + CreateTime = createTime; + CreatedBy = createdBy; + DateFormatter = dateFormatter; + Description = description; + Guid = guid; + Name = name; + Options = options; + ServiceType = serviceType; + TypeVersion = typeVersion; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + LastModifiedTS = lastModifiedTS; + AttributeDefs = attributeDefs; + EndDef1 = endDef1; + EndDef2 = endDef2; + RelationshipCategory = relationshipCategory; + RelationshipLabel = relationshipLabel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The enum of type category. + public TypeCategory? Category { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The date format. + public AtlasDateFormat DateFormatter { get; set; } + /// The description of the type definition. + public string Description { get; set; } + /// The GUID of the type definition. + public string Guid { get; set; } + /// The name of the type definition. + public string Name { get; set; } + /// The options for the type definition. + public IDictionary Options { get; } + /// The service type. + public string ServiceType { get; set; } + /// The version of the type. + public string TypeVersion { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The version of the record. + public long? Version { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// An array of attribute definitions. + public IList AttributeDefs { get; } + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + public AtlasRelationshipEndDef EndDef1 { get; set; } + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + public AtlasRelationshipEndDef EndDef2 { get; set; } + /// + /// The Relationship category determines the style of relationship around + /// containment and lifecycle. + /// UML terminology is used for the values. + /// ASSOCIATION is a relationship with no containment. + /// COMPOSITION and AGGREGATION are containment relationships. + /// The difference being in the lifecycles of the container and its children. + /// In the COMPOSITION case, the children cannot exist without the container. + /// For AGGREGATION, the life cycles of the container and children are totally independent. + /// + public RelationshipCategory? RelationshipCategory { get; set; } + /// The label of the relationship. + public string RelationshipLabel { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipEndDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipEndDef.Serialization.cs new file mode 100644 index 0000000000000..31ecd7602ff35 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipEndDef.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasRelationshipEndDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationshipEndDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Cardinality)) + { + writer.WritePropertyName("cardinality"u8); + writer.WriteStringValue(Cardinality.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(IsContainer)) + { + writer.WritePropertyName("isContainer"u8); + writer.WriteBooleanValue(IsContainer.Value); + } + if (Optional.IsDefined(IsLegacyAttribute)) + { + writer.WritePropertyName("isLegacyAttribute"u8); + writer.WriteBooleanValue(IsLegacyAttribute.Value); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasRelationshipEndDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationshipEndDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasRelationshipEndDef(document.RootElement, options); + } + + internal static AtlasRelationshipEndDef DeserializeAtlasRelationshipEndDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional cardinality = default; + Optional description = default; + Optional isContainer = default; + Optional isLegacyAttribute = default; + Optional name = default; + Optional type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cardinality"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cardinality = new CardinalityValue(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("isContainer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isContainer = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isLegacyAttribute"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLegacyAttribute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasRelationshipEndDef(Optional.ToNullable(cardinality), description.Value, Optional.ToNullable(isContainer), Optional.ToNullable(isLegacyAttribute), name.Value, type.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasRelationshipEndDef)} does not support '{options.Format}' format."); + } + } + + AtlasRelationshipEndDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasRelationshipEndDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasRelationshipEndDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasRelationshipEndDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasRelationshipEndDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipEndDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipEndDef.cs new file mode 100644 index 0000000000000..6a9eda12667a7 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipEndDef.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + public partial class AtlasRelationshipEndDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasRelationshipEndDef() + { + } + + /// Initializes a new instance of . + /// single-valued attribute or multi-valued attribute. + /// The description of the relationship end definition. + /// Determines if it is container. + /// Determines if it is a legacy attribute. + /// The name of the relationship end definition. + /// The type of the relationship end. + /// Keeps track of any properties unknown to the library. + internal AtlasRelationshipEndDef(CardinalityValue? cardinality, string description, bool? isContainer, bool? isLegacyAttribute, string name, string type, IDictionary serializedAdditionalRawData) + { + Cardinality = cardinality; + Description = description; + IsContainer = isContainer; + IsLegacyAttribute = isLegacyAttribute; + Name = name; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// single-valued attribute or multi-valued attribute. + public CardinalityValue? Cardinality { get; set; } + /// The description of the relationship end definition. + public string Description { get; set; } + /// Determines if it is container. + public bool? IsContainer { get; set; } + /// Determines if it is a legacy attribute. + public bool? IsLegacyAttribute { get; set; } + /// The name of the relationship end definition. + public string Name { get; set; } + /// The type of the relationship end. + public string Type { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipWithExtInfo.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipWithExtInfo.Serialization.cs new file mode 100644 index 0000000000000..27e4a17fb004e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipWithExtInfo.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasRelationshipWithExtInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationshipWithExtInfo)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ReferredEntities)) + { + writer.WritePropertyName("referredEntities"u8); + writer.WriteStartObject(); + foreach (var item in ReferredEntities) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Relationship)) + { + writer.WritePropertyName("relationship"u8); + writer.WriteObjectValue(Relationship); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasRelationshipWithExtInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasRelationshipWithExtInfo)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasRelationshipWithExtInfo(document.RootElement, options); + } + + internal static AtlasRelationshipWithExtInfo DeserializeAtlasRelationshipWithExtInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> referredEntities = default; + Optional relationship = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("referredEntities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, AtlasEntityHeader.DeserializeAtlasEntityHeader(property0.Value)); + } + referredEntities = dictionary; + continue; + } + if (property.NameEquals("relationship"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationship = AtlasRelationship.DeserializeAtlasRelationship(property.Value); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasRelationshipWithExtInfo(Optional.ToDictionary(referredEntities), relationship.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasRelationshipWithExtInfo)} does not support '{options.Format}' format."); + } + } + + AtlasRelationshipWithExtInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasRelationshipWithExtInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasRelationshipWithExtInfo)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasRelationshipWithExtInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasRelationshipWithExtInfo(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipWithExtInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipWithExtInfo.cs new file mode 100644 index 0000000000000..22627df2467da --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationshipWithExtInfo.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The relationship with extended information. + public partial class AtlasRelationshipWithExtInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AtlasRelationshipWithExtInfo() + { + ReferredEntities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The referred entity header. + /// Atlas relationship instance. + /// Keeps track of any properties unknown to the library. + internal AtlasRelationshipWithExtInfo(IReadOnlyDictionary referredEntities, AtlasRelationship relationship, IDictionary serializedAdditionalRawData) + { + ReferredEntities = referredEntities; + Relationship = relationship; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The referred entity header. + public IReadOnlyDictionary ReferredEntities { get; } + /// Atlas relationship instance. + public AtlasRelationship Relationship { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasSortType.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasSortType.cs new file mode 100644 index 0000000000000..83890f84ee51e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasSortType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Type for sorting. + public readonly partial struct AtlasSortType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AtlasSortType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "NONE"; + private const string AscendValue = "ASC"; + private const string DescendValue = "DESC"; + + /// No sorting order. + public static AtlasSortType None { get; } = new AtlasSortType(NoneValue); + /// Use ascending order for sorting. + public static AtlasSortType Ascend { get; } = new AtlasSortType(AscendValue); + /// Use descending order for sorting. + public static AtlasSortType Descend { get; } = new AtlasSortType(DescendValue); + /// Determines if two values are the same. + public static bool operator ==(AtlasSortType left, AtlasSortType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AtlasSortType left, AtlasSortType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AtlasSortType(string value) => new AtlasSortType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AtlasSortType other && Equals(other); + /// + public bool Equals(AtlasSortType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStruct.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStruct.Serialization.cs new file mode 100644 index 0000000000000..776e2242486f0 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStruct.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasStruct : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasStruct)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartObject(); + foreach (var item in Attributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasStruct IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasStruct)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasStruct(document.RootElement, options); + } + + internal static AtlasStruct DeserializeAtlasStruct(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> attributes = default; + Optional typeName = default; + Optional lastModifiedTS = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + attributes = dictionary; + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasStruct(Optional.ToDictionary(attributes), typeName.Value, lastModifiedTS.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasStruct)} does not support '{options.Format}' format."); + } + } + + AtlasStruct IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasStruct(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasStruct)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasStruct FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasStruct(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStruct.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStruct.cs new file mode 100644 index 0000000000000..4d9ad8d843f24 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStruct.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// Captures details of struct contents. Not instantiated directly, used only via + /// AtlasEntity, AtlasClassification. + /// + public partial class AtlasStruct + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasStruct() + { + Attributes = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The attributes of the struct. + /// The name of the type. + /// ETag for concurrency control. + /// Keeps track of any properties unknown to the library. + internal AtlasStruct(IDictionary attributes, string typeName, string lastModifiedTS, IDictionary serializedAdditionalRawData) + { + Attributes = attributes; + TypeName = typeName; + LastModifiedTS = lastModifiedTS; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The attributes of the struct. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary Attributes { get; } + /// The name of the type. + public string TypeName { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStructDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStructDef.Serialization.cs new file mode 100644 index 0000000000000..2c9146bc1d557 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStructDef.Serialization.cs @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasStructDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasStructDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(DateFormatter)) + { + writer.WritePropertyName("dateFormatter"u8); + writer.WriteObjectValue(DateFormatter); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ServiceType)) + { + writer.WritePropertyName("serviceType"u8); + writer.WriteStringValue(ServiceType); + } + if (Optional.IsDefined(TypeVersion)) + { + writer.WritePropertyName("typeVersion"u8); + writer.WriteStringValue(TypeVersion); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsCollectionDefined(AttributeDefs)) + { + writer.WritePropertyName("attributeDefs"u8); + writer.WriteStartArray(); + foreach (var item in AttributeDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasStructDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasStructDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasStructDef(document.RootElement, options); + } + + internal static AtlasStructDef DeserializeAtlasStructDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional createTime = default; + Optional createdBy = default; + Optional dateFormatter = default; + Optional description = default; + Optional guid = default; + Optional name = default; + Optional> options0 = default; + Optional serviceType = default; + Optional typeVersion = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + Optional lastModifiedTS = default; + Optional> attributeDefs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("dateFormatter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateFormatter = AtlasDateFormat.DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("serviceType"u8)) + { + serviceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeVersion"u8)) + { + typeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("attributeDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasAttributeDef.DeserializeAtlasAttributeDef(item)); + } + attributeDefs = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasStructDef(Optional.ToNullable(category), Optional.ToNullable(createTime), createdBy.Value, dateFormatter.Value, description.Value, guid.Value, name.Value, Optional.ToDictionary(options0), serviceType.Value, typeVersion.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), lastModifiedTS.Value, Optional.ToList(attributeDefs), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasStructDef)} does not support '{options.Format}' format."); + } + } + + AtlasStructDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasStructDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasStructDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasStructDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasStructDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStructDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStructDef.cs new file mode 100644 index 0000000000000..dfd9ae8c144ff --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasStructDef.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// class that captures details of a struct-type. + public partial class AtlasStructDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasStructDef() + { + Options = new ChangeTrackingDictionary(); + AttributeDefs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The created time of the record. + /// The user who created the record. + /// The date format. + /// The description of the type definition. + /// The GUID of the type definition. + /// The name of the type definition. + /// The options for the type definition. + /// The service type. + /// The version of the type. + /// The update time of the record. + /// The user who updated the record. + /// The version of the record. + /// ETag for concurrency control. + /// An array of attribute definitions. + /// Keeps track of any properties unknown to the library. + internal AtlasStructDef(TypeCategory? category, long? createTime, string createdBy, AtlasDateFormat dateFormatter, string description, string guid, string name, IDictionary options, string serviceType, string typeVersion, long? updateTime, string updatedBy, long? version, string lastModifiedTS, IList attributeDefs, IDictionary serializedAdditionalRawData) + { + Category = category; + CreateTime = createTime; + CreatedBy = createdBy; + DateFormatter = dateFormatter; + Description = description; + Guid = guid; + Name = name; + Options = options; + ServiceType = serviceType; + TypeVersion = typeVersion; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + LastModifiedTS = lastModifiedTS; + AttributeDefs = attributeDefs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The enum of type category. + public TypeCategory? Category { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The date format. + public AtlasDateFormat DateFormatter { get; set; } + /// The description of the type definition. + public string Description { get; set; } + /// The GUID of the type definition. + public string Guid { get; set; } + /// The name of the type definition. + public string Name { get; set; } + /// The options for the type definition. + public IDictionary Options { get; } + /// The service type. + public string ServiceType { get; set; } + /// The version of the type. + public string TypeVersion { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The version of the record. + public long? Version { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// An array of attribute definitions. + public IList AttributeDefs { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentHeader.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentHeader.Serialization.cs new file mode 100644 index 0000000000000..483f663173f73 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentHeader.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasTermAssignmentHeader : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTermAssignmentHeader)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Confidence)) + { + writer.WritePropertyName("confidence"u8); + writer.WriteNumberValue(Confidence.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(DisplayText)) + { + writer.WritePropertyName("displayText"u8); + writer.WriteStringValue(DisplayText); + } + if (Optional.IsDefined(Expression)) + { + writer.WritePropertyName("expression"u8); + writer.WriteStringValue(Expression); + } + if (Optional.IsDefined(RelationGuid)) + { + writer.WritePropertyName("relationGuid"u8); + writer.WriteStringValue(RelationGuid.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Steward)) + { + writer.WritePropertyName("steward"u8); + writer.WriteStringValue(Steward); + } + if (Optional.IsDefined(TermGuid)) + { + writer.WritePropertyName("termGuid"u8); + writer.WriteStringValue(TermGuid.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasTermAssignmentHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTermAssignmentHeader)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasTermAssignmentHeader(document.RootElement, options); + } + + internal static AtlasTermAssignmentHeader DeserializeAtlasTermAssignmentHeader(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional confidence = default; + Optional createdBy = default; + Optional description = default; + Optional displayText = default; + Optional expression = default; + Optional relationGuid = default; + Optional status = default; + Optional steward = default; + Optional termGuid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confidence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + confidence = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayText"u8)) + { + displayText = property.Value.GetString(); + continue; + } + if (property.NameEquals("expression"u8)) + { + expression = property.Value.GetString(); + continue; + } + if (property.NameEquals("relationGuid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationGuid = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new AtlasTermAssignmentStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("steward"u8)) + { + steward = property.Value.GetString(); + continue; + } + if (property.NameEquals("termGuid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + termGuid = property.Value.GetGuid(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasTermAssignmentHeader(Optional.ToNullable(confidence), createdBy.Value, description.Value, displayText.Value, expression.Value, Optional.ToNullable(relationGuid), Optional.ToNullable(status), steward.Value, Optional.ToNullable(termGuid), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasTermAssignmentHeader)} does not support '{options.Format}' format."); + } + } + + AtlasTermAssignmentHeader IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasTermAssignmentHeader(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasTermAssignmentHeader)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasTermAssignmentHeader FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasTermAssignmentHeader(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentHeader.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentHeader.cs new file mode 100644 index 0000000000000..d8c2a2a8a0322 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentHeader.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The header for term assignment. + public partial class AtlasTermAssignmentHeader + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasTermAssignmentHeader() + { + } + + /// Initializes a new instance of . + /// The confidence of the term assignment. + /// The user who created the record. + /// The description of the term assignment. + /// The display text. + /// The expression of the term assignment. + /// The GUID of the relationship. + /// The status of terms assignment. + /// The steward of the term. + /// The GUID of the term. + /// Keeps track of any properties unknown to the library. + internal AtlasTermAssignmentHeader(int? confidence, string createdBy, string description, string displayText, string expression, Guid? relationGuid, AtlasTermAssignmentStatus? status, string steward, Guid? termGuid, IDictionary serializedAdditionalRawData) + { + Confidence = confidence; + CreatedBy = createdBy; + Description = description; + DisplayText = displayText; + Expression = expression; + RelationGuid = relationGuid; + Status = status; + Steward = steward; + TermGuid = termGuid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The confidence of the term assignment. + public int? Confidence { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The description of the term assignment. + public string Description { get; set; } + /// The display text. + public string DisplayText { get; set; } + /// The expression of the term assignment. + public string Expression { get; set; } + /// The GUID of the relationship. + public Guid? RelationGuid { get; set; } + /// The status of terms assignment. + public AtlasTermAssignmentStatus? Status { get; set; } + /// The steward of the term. + public string Steward { get; set; } + /// The GUID of the term. + public Guid? TermGuid { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentStatus.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentStatus.cs new file mode 100644 index 0000000000000..8f1d17b9e3168 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermAssignmentStatus.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Status for term assignment. + public readonly partial struct AtlasTermAssignmentStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AtlasTermAssignmentStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DiscoveredValue = "DISCOVERED"; + private const string ProposedValue = "PROPOSED"; + private const string ImportedValue = "IMPORTED"; + private const string ValidatedValue = "VALIDATED"; + private const string DeprecatedValue = "DEPRECATED"; + private const string ObsoleteValue = "OBSOLETE"; + private const string OtherValue = "OTHER"; + + /// The status is discovered. + public static AtlasTermAssignmentStatus Discovered { get; } = new AtlasTermAssignmentStatus(DiscoveredValue); + /// The status is proposed. + public static AtlasTermAssignmentStatus Proposed { get; } = new AtlasTermAssignmentStatus(ProposedValue); + /// The status is imported. + public static AtlasTermAssignmentStatus Imported { get; } = new AtlasTermAssignmentStatus(ImportedValue); + /// The status is validated. + public static AtlasTermAssignmentStatus Validated { get; } = new AtlasTermAssignmentStatus(ValidatedValue); + /// The status is deprecated. + public static AtlasTermAssignmentStatus Deprecated { get; } = new AtlasTermAssignmentStatus(DeprecatedValue); + /// The status is obsolete. + public static AtlasTermAssignmentStatus Obsolete { get; } = new AtlasTermAssignmentStatus(ObsoleteValue); + /// Other status. + public static AtlasTermAssignmentStatus Other { get; } = new AtlasTermAssignmentStatus(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(AtlasTermAssignmentStatus left, AtlasTermAssignmentStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AtlasTermAssignmentStatus left, AtlasTermAssignmentStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AtlasTermAssignmentStatus(string value) => new AtlasTermAssignmentStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AtlasTermAssignmentStatus other && Equals(other); + /// + public bool Equals(AtlasTermAssignmentStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermCategorizationHeader.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermCategorizationHeader.Serialization.cs new file mode 100644 index 0000000000000..5aa86ac6ce29c --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermCategorizationHeader.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasTermCategorizationHeader : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTermCategorizationHeader)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(CategoryGuid)) + { + writer.WritePropertyName("categoryGuid"u8); + writer.WriteStringValue(CategoryGuid.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(DisplayText)) + { + writer.WritePropertyName("displayText"u8); + writer.WriteStringValue(DisplayText); + } + if (Optional.IsDefined(RelationGuid)) + { + writer.WritePropertyName("relationGuid"u8); + writer.WriteStringValue(RelationGuid.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasTermCategorizationHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTermCategorizationHeader)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasTermCategorizationHeader(document.RootElement, options); + } + + internal static AtlasTermCategorizationHeader DeserializeAtlasTermCategorizationHeader(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional categoryGuid = default; + Optional description = default; + Optional displayText = default; + Optional relationGuid = default; + Optional status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("categoryGuid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + categoryGuid = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayText"u8)) + { + displayText = property.Value.GetString(); + continue; + } + if (property.NameEquals("relationGuid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationGuid = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new AtlasTermRelationshipStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasTermCategorizationHeader(Optional.ToNullable(categoryGuid), description.Value, displayText.Value, Optional.ToNullable(relationGuid), Optional.ToNullable(status), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasTermCategorizationHeader)} does not support '{options.Format}' format."); + } + } + + AtlasTermCategorizationHeader IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasTermCategorizationHeader(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasTermCategorizationHeader)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasTermCategorizationHeader FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasTermCategorizationHeader(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermCategorizationHeader.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermCategorizationHeader.cs new file mode 100644 index 0000000000000..3245ed69a1baa --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermCategorizationHeader.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The basic information for term categorization. + public partial class AtlasTermCategorizationHeader + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasTermCategorizationHeader() + { + } + + /// Initializes a new instance of . + /// The GUID of the category. + /// The description of the record. + /// The display text. + /// The GUID of the relationship. + /// The status of term relationship. + /// Keeps track of any properties unknown to the library. + internal AtlasTermCategorizationHeader(Guid? categoryGuid, string description, string displayText, Guid? relationGuid, AtlasTermRelationshipStatus? status, IDictionary serializedAdditionalRawData) + { + CategoryGuid = categoryGuid; + Description = description; + DisplayText = displayText; + RelationGuid = relationGuid; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the category. + public Guid? CategoryGuid { get; set; } + /// The description of the record. + public string Description { get; set; } + /// The display text. + public string DisplayText { get; set; } + /// The GUID of the relationship. + public Guid? RelationGuid { get; set; } + /// The status of term relationship. + public AtlasTermRelationshipStatus? Status { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermRelationshipStatus.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermRelationshipStatus.cs new file mode 100644 index 0000000000000..a9ed516965c8e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTermRelationshipStatus.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Status for atlas term relationship. + public readonly partial struct AtlasTermRelationshipStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AtlasTermRelationshipStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DraftValue = "DRAFT"; + private const string ActiveValue = "ACTIVE"; + private const string DeprecatedValue = "DEPRECATED"; + private const string ObsoleteValue = "OBSOLETE"; + private const string OtherValue = "OTHER"; + + /// draft. + public static AtlasTermRelationshipStatus Draft { get; } = new AtlasTermRelationshipStatus(DraftValue); + /// active. + public static AtlasTermRelationshipStatus Active { get; } = new AtlasTermRelationshipStatus(ActiveValue); + /// deprecated. + public static AtlasTermRelationshipStatus Deprecated { get; } = new AtlasTermRelationshipStatus(DeprecatedValue); + /// obsolete. + public static AtlasTermRelationshipStatus Obsolete { get; } = new AtlasTermRelationshipStatus(ObsoleteValue); + /// other. + public static AtlasTermRelationshipStatus Other { get; } = new AtlasTermRelationshipStatus(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(AtlasTermRelationshipStatus left, AtlasTermRelationshipStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AtlasTermRelationshipStatus left, AtlasTermRelationshipStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AtlasTermRelationshipStatus(string value) => new AtlasTermRelationshipStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AtlasTermRelationshipStatus other && Equals(other); + /// + public bool Equals(AtlasTermRelationshipStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTimeZone.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTimeZone.Serialization.cs new file mode 100644 index 0000000000000..c250980ebce62 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTimeZone.Serialization.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasTimeZone : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTimeZone)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DstSavings)) + { + writer.WritePropertyName("dstSavings"u8); + writer.WriteNumberValue(DstSavings.Value); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(AvailableIds)) + { + writer.WritePropertyName("availableIds"u8); + writer.WriteStartArray(); + foreach (var item in AvailableIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Default)) + { + writer.WritePropertyName("default"u8); + writer.WriteObjectValue(Default); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(RawOffset)) + { + writer.WritePropertyName("rawOffset"u8); + writer.WriteNumberValue(RawOffset.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasTimeZone IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTimeZone)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasTimeZone(document.RootElement, options); + } + + internal static AtlasTimeZone DeserializeAtlasTimeZone(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional dstSavings = default; + Optional id = default; + Optional> availableIds = default; + Optional @default = default; + Optional displayName = default; + Optional rawOffset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dstSavings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dstSavings = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("availableIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableIds = array; + continue; + } + if (property.NameEquals("default"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @default = DeserializeAtlasTimeZone(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("rawOffset"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rawOffset = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasTimeZone(Optional.ToNullable(dstSavings), id.Value, Optional.ToList(availableIds), @default.Value, displayName.Value, Optional.ToNullable(rawOffset), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasTimeZone)} does not support '{options.Format}' format."); + } + } + + AtlasTimeZone IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasTimeZone(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasTimeZone)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasTimeZone FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasTimeZone(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTimeZone.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTimeZone.cs new file mode 100644 index 0000000000000..e611dbfc60abf --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTimeZone.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The timezone information. + public partial class AtlasTimeZone + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasTimeZone() + { + AvailableIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The value of the daylight saving time. + /// The ID of the timezone. + /// An array of available IDs. + /// The timezone information. + /// The display name of the timezone. + /// The raw offset of the timezone. + /// Keeps track of any properties unknown to the library. + internal AtlasTimeZone(int? dstSavings, string id, IList availableIds, AtlasTimeZone @default, string displayName, int? rawOffset, IDictionary serializedAdditionalRawData) + { + DstSavings = dstSavings; + Id = id; + AvailableIds = availableIds; + Default = @default; + DisplayName = displayName; + RawOffset = rawOffset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The value of the daylight saving time. + public int? DstSavings { get; set; } + /// The ID of the timezone. + public string Id { get; set; } + /// An array of available IDs. + public IList AvailableIds { get; } + /// The timezone information. + public AtlasTimeZone Default { get; set; } + /// The display name of the timezone. + public string DisplayName { get; set; } + /// The raw offset of the timezone. + public int? RawOffset { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDef.Serialization.cs new file mode 100644 index 0000000000000..869aabcce6aba --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDef.Serialization.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasTypeDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTypeDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(DateFormatter)) + { + writer.WritePropertyName("dateFormatter"u8); + writer.WriteObjectValue(DateFormatter); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ServiceType)) + { + writer.WritePropertyName("serviceType"u8); + writer.WriteStringValue(ServiceType); + } + if (Optional.IsDefined(TypeVersion)) + { + writer.WritePropertyName("typeVersion"u8); + writer.WriteStringValue(TypeVersion); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsCollectionDefined(EntityTypes)) + { + writer.WritePropertyName("entityTypes"u8); + writer.WriteStartArray(); + foreach (var item in EntityTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SubTypes)) + { + writer.WritePropertyName("subTypes"u8); + writer.WriteStartArray(); + foreach (var item in SubTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SuperTypes)) + { + writer.WritePropertyName("superTypes"u8); + writer.WriteStartArray(); + foreach (var item in SuperTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RelationshipAttributeDefs)) + { + writer.WritePropertyName("relationshipAttributeDefs"u8); + writer.WriteStartArray(); + foreach (var item in RelationshipAttributeDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DefaultValue)) + { + writer.WritePropertyName("defaultValue"u8); + writer.WriteStringValue(DefaultValue); + } + if (Optional.IsCollectionDefined(ElementDefs)) + { + writer.WritePropertyName("elementDefs"u8); + writer.WriteStartArray(); + foreach (var item in ElementDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(EndDef1)) + { + writer.WritePropertyName("endDef1"u8); + writer.WriteObjectValue(EndDef1); + } + if (Optional.IsDefined(EndDef2)) + { + writer.WritePropertyName("endDef2"u8); + writer.WriteObjectValue(EndDef2); + } + if (Optional.IsDefined(RelationshipCategory)) + { + writer.WritePropertyName("relationshipCategory"u8); + writer.WriteStringValue(RelationshipCategory.Value.ToString()); + } + if (Optional.IsDefined(RelationshipLabel)) + { + writer.WritePropertyName("relationshipLabel"u8); + writer.WriteStringValue(RelationshipLabel); + } + if (Optional.IsCollectionDefined(AttributeDefs)) + { + writer.WritePropertyName("attributeDefs"u8); + writer.WriteStartArray(); + foreach (var item in AttributeDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasTypeDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTypeDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasTypeDef(document.RootElement, options); + } + + internal static AtlasTypeDef DeserializeAtlasTypeDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional createTime = default; + Optional createdBy = default; + Optional dateFormatter = default; + Optional description = default; + Optional guid = default; + Optional name = default; + Optional> options0 = default; + Optional serviceType = default; + Optional typeVersion = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + Optional lastModifiedTS = default; + Optional> entityTypes = default; + Optional> subTypes = default; + Optional> superTypes = default; + Optional> relationshipAttributeDefs = default; + Optional defaultValue = default; + Optional> elementDefs = default; + Optional endDef1 = default; + Optional endDef2 = default; + Optional relationshipCategory = default; + Optional relationshipLabel = default; + Optional> attributeDefs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("dateFormatter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateFormatter = AtlasDateFormat.DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("serviceType"u8)) + { + serviceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeVersion"u8)) + { + typeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + entityTypes = array; + continue; + } + if (property.NameEquals("subTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + subTypes = array; + continue; + } + if (property.NameEquals("superTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + superTypes = array; + continue; + } + if (property.NameEquals("relationshipAttributeDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelationshipAttributeDef.DeserializeAtlasRelationshipAttributeDef(item)); + } + relationshipAttributeDefs = array; + continue; + } + if (property.NameEquals("defaultValue"u8)) + { + defaultValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("elementDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasEnumElementDef.DeserializeAtlasEnumElementDef(item)); + } + elementDefs = array; + continue; + } + if (property.NameEquals("endDef1"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDef1 = AtlasRelationshipEndDef.DeserializeAtlasRelationshipEndDef(property.Value); + continue; + } + if (property.NameEquals("endDef2"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDef2 = AtlasRelationshipEndDef.DeserializeAtlasRelationshipEndDef(property.Value); + continue; + } + if (property.NameEquals("relationshipCategory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationshipCategory = new RelationshipCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("relationshipLabel"u8)) + { + relationshipLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("attributeDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasAttributeDef.DeserializeAtlasAttributeDef(item)); + } + attributeDefs = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasTypeDef(Optional.ToNullable(category), Optional.ToNullable(createTime), createdBy.Value, dateFormatter.Value, description.Value, guid.Value, name.Value, Optional.ToDictionary(options0), serviceType.Value, typeVersion.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), lastModifiedTS.Value, Optional.ToList(entityTypes), Optional.ToList(subTypes), Optional.ToList(superTypes), Optional.ToList(relationshipAttributeDefs), defaultValue.Value, Optional.ToList(elementDefs), endDef1.Value, endDef2.Value, Optional.ToNullable(relationshipCategory), relationshipLabel.Value, Optional.ToList(attributeDefs), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasTypeDef)} does not support '{options.Format}' format."); + } + } + + AtlasTypeDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasTypeDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasTypeDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasTypeDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasTypeDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDef.cs new file mode 100644 index 0000000000000..3e9c91ee50db3 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDef.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The definitions of type. + public partial class AtlasTypeDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AtlasTypeDef() + { + Options = new ChangeTrackingDictionary(); + EntityTypes = new ChangeTrackingList(); + SubTypes = new ChangeTrackingList(); + SuperTypes = new ChangeTrackingList(); + RelationshipAttributeDefs = new ChangeTrackingList(); + ElementDefs = new ChangeTrackingList(); + AttributeDefs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The created time of the record. + /// The user who created the record. + /// The date format. + /// The description of the type definition. + /// The GUID of the type definition. + /// The name of the type definition. + /// The options for the type definition. + /// The service type. + /// The version of the type. + /// The update time of the record. + /// The user who updated the record. + /// The version of the record. + /// ETag for concurrency control. + /// + /// Specifying a list of entityType names in the classificationDef, ensures that + /// classifications can + /// only be applied to those entityTypes. + /// + /// Any subtypes of the entity types inherit the restriction. + /// + /// Any classificationDef subtypes inherit the parents entityTypes restrictions. + /// + /// Any classificationDef subtypes can further restrict the parents entityTypes + /// restrictions by specifying a subset of the entityTypes. + /// + /// An empty entityTypes list when there are no parent restrictions means there are no + /// restrictions. + /// + /// An empty entityTypes list when there are parent + /// restrictions means that the subtype picks up the parents + /// restrictions. + /// + /// If a list of entityTypes are supplied, where one inherits + /// from another, this will be rejected. This should encourage cleaner + /// classificationsDefs. + /// + /// + /// An array of sub types. + /// An array of super types. + /// An array of relationship attributes. + /// The default value. + /// An array of enum element definitions. + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + /// + /// The Relationship category determines the style of relationship around + /// containment and lifecycle. + /// UML terminology is used for the values. + /// + /// ASSOCIATION is a relationship with no containment. + /// COMPOSITION and AGGREGATION are containment relationships. + /// + /// The difference being in the lifecycles of the container and its children. + /// In the COMPOSITION case, the children cannot exist without the container. + /// For AGGREGATION, the life cycles of the container and children are totally independent. + /// + /// The label of the relationship. + /// An array of attribute definitions. + /// Keeps track of any properties unknown to the library. + internal AtlasTypeDef(TypeCategory? category, long? createTime, string createdBy, AtlasDateFormat dateFormatter, string description, string guid, string name, IReadOnlyDictionary options, string serviceType, string typeVersion, long? updateTime, string updatedBy, long? version, string lastModifiedTS, IReadOnlyList entityTypes, IReadOnlyList subTypes, IReadOnlyList superTypes, IReadOnlyList relationshipAttributeDefs, string defaultValue, IReadOnlyList elementDefs, AtlasRelationshipEndDef endDef1, AtlasRelationshipEndDef endDef2, RelationshipCategory? relationshipCategory, string relationshipLabel, IReadOnlyList attributeDefs, IDictionary serializedAdditionalRawData) + { + Category = category; + CreateTime = createTime; + CreatedBy = createdBy; + DateFormatter = dateFormatter; + Description = description; + Guid = guid; + Name = name; + Options = options; + ServiceType = serviceType; + TypeVersion = typeVersion; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + LastModifiedTS = lastModifiedTS; + EntityTypes = entityTypes; + SubTypes = subTypes; + SuperTypes = superTypes; + RelationshipAttributeDefs = relationshipAttributeDefs; + DefaultValue = defaultValue; + ElementDefs = elementDefs; + EndDef1 = endDef1; + EndDef2 = endDef2; + RelationshipCategory = relationshipCategory; + RelationshipLabel = relationshipLabel; + AttributeDefs = attributeDefs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The enum of type category. + public TypeCategory? Category { get; } + /// The created time of the record. + public long? CreateTime { get; } + /// The user who created the record. + public string CreatedBy { get; } + /// The date format. + public AtlasDateFormat DateFormatter { get; } + /// The description of the type definition. + public string Description { get; } + /// The GUID of the type definition. + public string Guid { get; } + /// The name of the type definition. + public string Name { get; } + /// The options for the type definition. + public IReadOnlyDictionary Options { get; } + /// The service type. + public string ServiceType { get; } + /// The version of the type. + public string TypeVersion { get; } + /// The update time of the record. + public long? UpdateTime { get; } + /// The user who updated the record. + public string UpdatedBy { get; } + /// The version of the record. + public long? Version { get; } + /// ETag for concurrency control. + public string LastModifiedTS { get; } + /// + /// Specifying a list of entityType names in the classificationDef, ensures that + /// classifications can + /// only be applied to those entityTypes. + /// + /// Any subtypes of the entity types inherit the restriction. + /// + /// Any classificationDef subtypes inherit the parents entityTypes restrictions. + /// + /// Any classificationDef subtypes can further restrict the parents entityTypes + /// restrictions by specifying a subset of the entityTypes. + /// + /// An empty entityTypes list when there are no parent restrictions means there are no + /// restrictions. + /// + /// An empty entityTypes list when there are parent + /// restrictions means that the subtype picks up the parents + /// restrictions. + /// + /// If a list of entityTypes are supplied, where one inherits + /// from another, this will be rejected. This should encourage cleaner + /// classificationsDefs. + /// + /// + public IReadOnlyList EntityTypes { get; } + /// An array of sub types. + public IReadOnlyList SubTypes { get; } + /// An array of super types. + public IReadOnlyList SuperTypes { get; } + /// An array of relationship attributes. + public IReadOnlyList RelationshipAttributeDefs { get; } + /// The default value. + public string DefaultValue { get; } + /// An array of enum element definitions. + public IReadOnlyList ElementDefs { get; } + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + public AtlasRelationshipEndDef EndDef1 { get; } + /// + /// The relationshipEndDef represents an end of the relationship. The end of the + /// relationship is defined by a type, an + /// attribute name, cardinality and whether + /// it is the container end of the relationship. + /// + public AtlasRelationshipEndDef EndDef2 { get; } + /// + /// The Relationship category determines the style of relationship around + /// containment and lifecycle. + /// UML terminology is used for the values. + /// + /// ASSOCIATION is a relationship with no containment. + /// COMPOSITION and AGGREGATION are containment relationships. + /// + /// The difference being in the lifecycles of the container and its children. + /// In the COMPOSITION case, the children cannot exist without the container. + /// For AGGREGATION, the life cycles of the container and children are totally independent. + /// + public RelationshipCategory? RelationshipCategory { get; } + /// The label of the relationship. + public string RelationshipLabel { get; } + /// An array of attribute definitions. + public IReadOnlyList AttributeDefs { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDefHeader.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDefHeader.Serialization.cs new file mode 100644 index 0000000000000..dea4f7a51b8a8 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDefHeader.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasTypeDefHeader : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTypeDefHeader)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasTypeDefHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTypeDefHeader)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasTypeDefHeader(document.RootElement, options); + } + + internal static AtlasTypeDefHeader DeserializeAtlasTypeDefHeader(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional guid = default; + Optional name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasTypeDefHeader(Optional.ToNullable(category), guid.Value, name.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasTypeDefHeader)} does not support '{options.Format}' format."); + } + } + + AtlasTypeDefHeader IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasTypeDefHeader(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasTypeDefHeader)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasTypeDefHeader FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasTypeDefHeader(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDefHeader.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDefHeader.cs new file mode 100644 index 0000000000000..7a6a035cc11ac --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypeDefHeader.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The basic information of the type definition. + public partial class AtlasTypeDefHeader + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AtlasTypeDefHeader() + { + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The GUID of the type definition. + /// The name of the type definition. + /// Keeps track of any properties unknown to the library. + internal AtlasTypeDefHeader(TypeCategory? category, string guid, string name, IDictionary serializedAdditionalRawData) + { + Category = category; + Guid = guid; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The enum of type category. + public TypeCategory? Category { get; } + /// The GUID of the type definition. + public string Guid { get; } + /// The name of the type definition. + public string Name { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.Serialization.cs new file mode 100644 index 0000000000000..60d81d1b71967 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.Serialization.cs @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AtlasTypesDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTypesDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(BusinessMetadataDefs)) + { + writer.WritePropertyName("businessMetadataDefs"u8); + writer.WriteStartArray(); + foreach (var item in BusinessMetadataDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ClassificationDefs)) + { + writer.WritePropertyName("classificationDefs"u8); + writer.WriteStartArray(); + foreach (var item in ClassificationDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EntityDefs)) + { + writer.WritePropertyName("entityDefs"u8); + writer.WriteStartArray(); + foreach (var item in EntityDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EnumDefs)) + { + writer.WritePropertyName("enumDefs"u8); + writer.WriteStartArray(); + foreach (var item in EnumDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RelationshipDefs)) + { + writer.WritePropertyName("relationshipDefs"u8); + writer.WriteStartArray(); + foreach (var item in RelationshipDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(StructDefs)) + { + writer.WritePropertyName("structDefs"u8); + writer.WriteStartArray(); + foreach (var item in StructDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(TermTemplateDefs)) + { + writer.WritePropertyName("termTemplateDefs"u8); + writer.WriteStartArray(); + foreach (var item in TermTemplateDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AtlasTypesDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AtlasTypesDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAtlasTypesDef(document.RootElement, options); + } + + internal static AtlasTypesDef DeserializeAtlasTypesDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> businessMetadataDefs = default; + Optional> classificationDefs = default; + Optional> entityDefs = default; + Optional> enumDefs = default; + Optional> relationshipDefs = default; + Optional> structDefs = default; + Optional> termTemplateDefs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("businessMetadataDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasBusinessMetadataDef.DeserializeAtlasBusinessMetadataDef(item)); + } + businessMetadataDefs = array; + continue; + } + if (property.NameEquals("classificationDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasClassificationDef.DeserializeAtlasClassificationDef(item)); + } + classificationDefs = array; + continue; + } + if (property.NameEquals("entityDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasEntityDef.DeserializeAtlasEntityDef(item)); + } + entityDefs = array; + continue; + } + if (property.NameEquals("enumDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasEnumDef.DeserializeAtlasEnumDef(item)); + } + enumDefs = array; + continue; + } + if (property.NameEquals("relationshipDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelationshipDef.DeserializeAtlasRelationshipDef(item)); + } + relationshipDefs = array; + continue; + } + if (property.NameEquals("structDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasStructDef.DeserializeAtlasStructDef(item)); + } + structDefs = array; + continue; + } + if (property.NameEquals("termTemplateDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TermTemplateDef.DeserializeTermTemplateDef(item)); + } + termTemplateDefs = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AtlasTypesDef(Optional.ToList(businessMetadataDefs), Optional.ToList(classificationDefs), Optional.ToList(entityDefs), Optional.ToList(enumDefs), Optional.ToList(relationshipDefs), Optional.ToList(structDefs), Optional.ToList(termTemplateDefs), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AtlasTypesDef)} does not support '{options.Format}' format."); + } + } + + AtlasTypesDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAtlasTypesDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AtlasTypesDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AtlasTypesDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAtlasTypesDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.cs new file mode 100644 index 0000000000000..574ee6b5e65b0 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The definitions of types. + public partial class AtlasTypesDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AtlasTypesDef() + { + BusinessMetadataDefs = new ChangeTrackingList(); + ClassificationDefs = new ChangeTrackingList(); + EntityDefs = new ChangeTrackingList(); + EnumDefs = new ChangeTrackingList(); + RelationshipDefs = new ChangeTrackingList(); + StructDefs = new ChangeTrackingList(); + TermTemplateDefs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// businessMetadataDefs. + /// An array of classification definitions. + /// An array of entity definitions. + /// An array of enum definitions. + /// An array of relationship definitions. + /// An array of struct definitions. + /// An array of term template definitions. + /// Keeps track of any properties unknown to the library. + internal AtlasTypesDef(IList businessMetadataDefs, IList classificationDefs, IList entityDefs, IList enumDefs, IList relationshipDefs, IList structDefs, IList termTemplateDefs, IDictionary serializedAdditionalRawData) + { + BusinessMetadataDefs = businessMetadataDefs; + ClassificationDefs = classificationDefs; + EntityDefs = entityDefs; + EnumDefs = enumDefs; + RelationshipDefs = relationshipDefs; + StructDefs = structDefs; + TermTemplateDefs = termTemplateDefs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// businessMetadataDefs. + public IList BusinessMetadataDefs { get; } + /// An array of classification definitions. + public IList ClassificationDefs { get; } + /// An array of entity definitions. + public IList EntityDefs { get; } + /// An array of enum definitions. + public IList EnumDefs { get; } + /// An array of relationship definitions. + public IList RelationshipDefs { get; } + /// An array of struct definitions. + public IList StructDefs { get; } + /// An array of term template definitions. + public IList TermTemplateDefs { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.Serialization.cs new file mode 100644 index 0000000000000..3c4bcb4f3da46 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AutoCompleteConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoCompleteConfig)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Keywords)) + { + writer.WritePropertyName("keywords"u8); + writer.WriteStringValue(Keywords); + } + if (Optional.IsDefined(Limit)) + { + writer.WritePropertyName("limit"u8); + writer.WriteNumberValue(Limit.Value); + } + if (Optional.IsDefined(Filter)) + { + writer.WritePropertyName("filter"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Filter); +#else + using (JsonDocument document = JsonDocument.Parse(Filter)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AutoCompleteConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoCompleteConfig)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoCompleteConfig(document.RootElement, options); + } + + internal static AutoCompleteConfig DeserializeAutoCompleteConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional keywords = default; + Optional limit = default; + Optional filter = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keywords"u8)) + { + keywords = property.Value.GetString(); + continue; + } + if (property.NameEquals("limit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + limit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("filter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filter = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AutoCompleteConfig(keywords.Value, Optional.ToNullable(limit), filter.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoCompleteConfig)} does not support '{options.Format}' format."); + } + } + + AutoCompleteConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoCompleteConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoCompleteConfig)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AutoCompleteConfig FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAutoCompleteConfig(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.cs new file mode 100644 index 0000000000000..3a8c72aa0520b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The payload of autocomplete request. + public partial class AutoCompleteConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutoCompleteConfig() + { + } + + /// Initializes a new instance of . + /// + /// The keywords applied to all fields that support autocomplete operation. It must + /// be at least 1 character, and no more than 100 characters. + /// + /// + /// The number of autocomplete results we hope to return. The default value is 50. + /// The value must be a number between 1 and 100. + /// + /// The filter for the autocomplete request. + /// Keeps track of any properties unknown to the library. + internal AutoCompleteConfig(string keywords, int? limit, BinaryData filter, IDictionary serializedAdditionalRawData) + { + Keywords = keywords; + Limit = limit; + Filter = filter; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The keywords applied to all fields that support autocomplete operation. It must + /// be at least 1 character, and no more than 100 characters. + /// + public string Keywords { get; set; } + /// + /// The number of autocomplete results we hope to return. The default value is 50. + /// The value must be a number between 1 and 100. + /// + public int? Limit { get; set; } + /// + /// The filter for the autocomplete request. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Filter { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResult.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResult.Serialization.cs new file mode 100644 index 0000000000000..1093e5465027b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResult.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AutoCompleteResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoCompleteResult)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AutoCompleteResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoCompleteResult)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoCompleteResult(document.RootElement, options); + } + + internal static AutoCompleteResult DeserializeAutoCompleteResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AutoCompleteResultValue.DeserializeAutoCompleteResultValue(item)); + } + value = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AutoCompleteResult(Optional.ToList(value), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoCompleteResult)} does not support '{options.Format}' format."); + } + } + + AutoCompleteResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoCompleteResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoCompleteResult)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AutoCompleteResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAutoCompleteResult(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResult.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResult.cs new file mode 100644 index 0000000000000..35f1da897d183 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResult.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The result of the autocomplete request. + public partial class AutoCompleteResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AutoCompleteResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The result value. + /// Keeps track of any properties unknown to the library. + internal AutoCompleteResult(IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The result value. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResultValue.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResultValue.Serialization.cs new file mode 100644 index 0000000000000..8025f868e8d6a --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResultValue.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class AutoCompleteResultValue : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoCompleteResultValue)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + if (Optional.IsDefined(QueryPlusText)) + { + writer.WritePropertyName("queryPlusText"u8); + writer.WriteStringValue(QueryPlusText); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AutoCompleteResultValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoCompleteResultValue)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoCompleteResultValue(document.RootElement, options); + } + + internal static AutoCompleteResultValue DeserializeAutoCompleteResultValue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional text = default; + Optional queryPlusText = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("queryPlusText"u8)) + { + queryPlusText = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AutoCompleteResultValue(text.Value, queryPlusText.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoCompleteResultValue)} does not support '{options.Format}' format."); + } + } + + AutoCompleteResultValue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoCompleteResultValue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoCompleteResultValue)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AutoCompleteResultValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAutoCompleteResultValue(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResultValue.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResultValue.cs new file mode 100644 index 0000000000000..8ee346e8b5da6 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteResultValue.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The value item of the autocomplete suggest. + public partial class AutoCompleteResultValue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AutoCompleteResultValue() + { + } + + /// Initializes a new instance of . + /// The completed term or phrase. + /// The completed search query text. + /// Keeps track of any properties unknown to the library. + internal AutoCompleteResultValue(string text, string queryPlusText, IDictionary serializedAdditionalRawData) + { + Text = text; + QueryPlusText = queryPlusText; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The completed term or phrase. + public string Text { get; } + /// The completed search query text. + public string QueryPlusText { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BulkImportResult.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BulkImportResult.Serialization.cs new file mode 100644 index 0000000000000..000dde9041875 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BulkImportResult.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class BulkImportResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BulkImportResult)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(FailedImportInfoList)) + { + writer.WritePropertyName("failedImportInfoList"u8); + writer.WriteStartArray(); + foreach (var item in FailedImportInfoList) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SuccessImportInfoList)) + { + writer.WritePropertyName("successImportInfoList"u8); + writer.WriteStartArray(); + foreach (var item in SuccessImportInfoList) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BulkImportResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BulkImportResult)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBulkImportResult(document.RootElement, options); + } + + internal static BulkImportResult DeserializeBulkImportResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> failedImportInfoList = default; + Optional> successImportInfoList = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failedImportInfoList"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ImportInfo.DeserializeImportInfo(item)); + } + failedImportInfoList = array; + continue; + } + if (property.NameEquals("successImportInfoList"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ImportInfo.DeserializeImportInfo(item)); + } + successImportInfoList = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new BulkImportResult(Optional.ToList(failedImportInfoList), Optional.ToList(successImportInfoList), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BulkImportResult)} does not support '{options.Format}' format."); + } + } + + BulkImportResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBulkImportResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BulkImportResult)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BulkImportResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBulkImportResult(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BulkImportResult.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BulkImportResult.cs new file mode 100644 index 0000000000000..99b29ec6b1df5 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BulkImportResult.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Bulk import result. + public partial class BulkImportResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BulkImportResult() + { + FailedImportInfoList = new ChangeTrackingList(); + SuccessImportInfoList = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// failed importInfoList. + /// successful importInfoList. + /// Keeps track of any properties unknown to the library. + internal BulkImportResult(IReadOnlyList failedImportInfoList, IReadOnlyList successImportInfoList, IDictionary serializedAdditionalRawData) + { + FailedImportInfoList = failedImportInfoList; + SuccessImportInfoList = successImportInfoList; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// failed importInfoList. + public IReadOnlyList FailedImportInfoList { get; } + /// successful importInfoList. + public IReadOnlyList SuccessImportInfoList { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BusinessAttributeUpdateBehavior.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BusinessAttributeUpdateBehavior.cs new file mode 100644 index 0000000000000..3048584216d32 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/BusinessAttributeUpdateBehavior.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Enum for business attribute update behavior. + public readonly partial struct BusinessAttributeUpdateBehavior : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BusinessAttributeUpdateBehavior(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IgnoreValue = "ignore"; + private const string ReplaceValue = "replace"; + private const string MergeValue = "merge"; + + /// Ignore the business attribute payload for update. + public static BusinessAttributeUpdateBehavior Ignore { get; } = new BusinessAttributeUpdateBehavior(IgnoreValue); + /// Replace all the business attributes using the payload. + public static BusinessAttributeUpdateBehavior Replace { get; } = new BusinessAttributeUpdateBehavior(ReplaceValue); + /// Merge the business attributes. Business attributes will not be updated if not provided. + public static BusinessAttributeUpdateBehavior Merge { get; } = new BusinessAttributeUpdateBehavior(MergeValue); + /// Determines if two values are the same. + public static bool operator ==(BusinessAttributeUpdateBehavior left, BusinessAttributeUpdateBehavior right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BusinessAttributeUpdateBehavior left, BusinessAttributeUpdateBehavior right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BusinessAttributeUpdateBehavior(string value) => new BusinessAttributeUpdateBehavior(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BusinessAttributeUpdateBehavior other && Equals(other); + /// + public bool Equals(BusinessAttributeUpdateBehavior other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/CardinalityValue.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/CardinalityValue.cs new file mode 100644 index 0000000000000..20708f920eb63 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/CardinalityValue.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Cardinality. + public readonly partial struct CardinalityValue : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CardinalityValue(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SingleValue = "SINGLE"; + private const string ListValue = "LIST"; + private const string SetValue = "SET"; + + /// single. + public static CardinalityValue Single { get; } = new CardinalityValue(SingleValue); + /// list. + public static CardinalityValue List { get; } = new CardinalityValue(ListValue); + /// set. + public static CardinalityValue Set { get; } = new CardinalityValue(SetValue); + /// Determines if two values are the same. + public static bool operator ==(CardinalityValue left, CardinalityValue right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CardinalityValue left, CardinalityValue right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CardinalityValue(string value) => new CardinalityValue(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CardinalityValue other && Equals(other); + /// + public bool Equals(CardinalityValue other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.Serialization.cs new file mode 100644 index 0000000000000..a3cc0d3d3265b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class ClassificationAssociateConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClassificationAssociateConfig)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Classification)) + { + writer.WritePropertyName("classification"u8); + writer.WriteObjectValue(Classification); + } + if (Optional.IsCollectionDefined(EntityGuids)) + { + writer.WritePropertyName("entityGuids"u8); + writer.WriteStartArray(); + foreach (var item in EntityGuids) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ClassificationAssociateConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClassificationAssociateConfig)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClassificationAssociateConfig(document.RootElement, options); + } + + internal static ClassificationAssociateConfig DeserializeClassificationAssociateConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional classification = default; + Optional> entityGuids = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + classification = AtlasClassification.DeserializeAtlasClassification(property.Value); + continue; + } + if (property.NameEquals("entityGuids"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + entityGuids = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ClassificationAssociateConfig(classification.Value, Optional.ToList(entityGuids), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ClassificationAssociateConfig)} does not support '{options.Format}' format."); + } + } + + ClassificationAssociateConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeClassificationAssociateConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClassificationAssociateConfig)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ClassificationAssociateConfig FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeClassificationAssociateConfig(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.cs new file mode 100644 index 0000000000000..c4b07a213677d --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The request payload for classification association. + public partial class ClassificationAssociateConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ClassificationAssociateConfig() + { + EntityGuids = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// An instance of a classification; it doesn't have an identity, this object + /// exists only when associated with an entity. + /// + /// The GUID of the entity. + /// Keeps track of any properties unknown to the library. + internal ClassificationAssociateConfig(AtlasClassification classification, IList entityGuids, IDictionary serializedAdditionalRawData) + { + Classification = classification; + EntityGuids = entityGuids; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// An instance of a classification; it doesn't have an identity, this object + /// exists only when associated with an entity. + /// + public AtlasClassification Classification { get; set; } + /// The GUID of the entity. + public IList EntityGuids { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactInfo.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactInfo.Serialization.cs new file mode 100644 index 0000000000000..472aebb16d764 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactInfo.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class ContactInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContactInfo)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Info)) + { + writer.WritePropertyName("info"u8); + writer.WriteStringValue(Info); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ContactInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContactInfo)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContactInfo(document.RootElement, options); + } + + internal static ContactInfo DeserializeContactInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + Optional info = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("info"u8)) + { + info = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ContactInfo(id.Value, info.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ContactInfo)} does not support '{options.Format}' format."); + } + } + + ContactInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContactInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContactInfo)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ContactInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeContactInfo(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactInfo.cs new file mode 100644 index 0000000000000..d83e694e86186 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactInfo.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// ContactInfo. + public partial class ContactInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ContactInfo() + { + } + + /// Initializes a new instance of . + /// Azure Active Directory object Id. + /// additional information to describe this contact. + /// Keeps track of any properties unknown to the library. + internal ContactInfo(string id, string info, IDictionary serializedAdditionalRawData) + { + Id = id; + Info = info; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure Active Directory object Id. + public string Id { get; set; } + /// additional information to describe this contact. + public string Info { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactSearchResultValue.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactSearchResultValue.Serialization.cs new file mode 100644 index 0000000000000..519a1ca7edf61 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactSearchResultValue.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class ContactSearchResultValue : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContactSearchResultValue)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Info)) + { + writer.WritePropertyName("info"u8); + writer.WriteStringValue(Info); + } + if (Optional.IsDefined(ContactType)) + { + writer.WritePropertyName("contactType"u8); + writer.WriteStringValue(ContactType); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ContactSearchResultValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContactSearchResultValue)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContactSearchResultValue(document.RootElement, options); + } + + internal static ContactSearchResultValue DeserializeContactSearchResultValue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + Optional info = default; + Optional contactType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("info"u8)) + { + info = property.Value.GetString(); + continue; + } + if (property.NameEquals("contactType"u8)) + { + contactType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ContactSearchResultValue(id.Value, info.Value, contactType.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ContactSearchResultValue)} does not support '{options.Format}' format."); + } + } + + ContactSearchResultValue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContactSearchResultValue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContactSearchResultValue)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ContactSearchResultValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeContactSearchResultValue(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactSearchResultValue.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactSearchResultValue.cs new file mode 100644 index 0000000000000..40fe93701e9a8 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ContactSearchResultValue.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The contact in the search and suggest result. + public partial class ContactSearchResultValue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ContactSearchResultValue() + { + } + + /// Initializes a new instance of . + /// The GUID of the contact. + /// The description of the contact. + /// + /// The type of the contact. It can be Expert or Owner for an entity. It can be + /// Expert or Steward for a glossary term. + /// + /// Keeps track of any properties unknown to the library. + internal ContactSearchResultValue(string id, string info, string contactType, IDictionary serializedAdditionalRawData) + { + Id = id; + Info = info; + ContactType = contactType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the contact. + public string Id { get; } + /// The description of the contact. + public string Info { get; } + /// + /// The type of the contact. It can be Expert or Owner for an entity. It can be + /// Expert or Steward for a glossary term. + /// + public string ContactType { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/DataMapClient.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/DataMapClient.cs new file mode 100644 index 0000000000000..1ddf6c2565899 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/DataMapClient.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Purview.DataMap +{ + // Data plane generated client. + /// The DataMap service client. + public partial class DataMapClient + { + private static readonly string[] AuthorizationScopes = new string[] { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of DataMapClient for mocking. + protected DataMapClient() + { + } + + /// Initializes a new instance of DataMapClient. + /// The to use. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public DataMapClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new DataMapClientOptions()) + { + } + + /// Initializes a new instance of DataMapClient. + /// The to use. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public DataMapClient(Uri endpoint, TokenCredential credential, DataMapClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new DataMapClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + private Relationship _cachedRelationship; + + /// Initializes a new instance of Entity. + /// The API version to use for this operation. + public virtual Entity GetEntityClient(string apiVersion = "2023-09-01") + { + return new Entity(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of Glossary. + /// The API version to use for this operation. + public virtual Glossary GetGlossaryClient(string apiVersion = "2023-09-01") + { + return new Glossary(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of Discovery. + /// The API version to use for this operation. + /// is null. + public virtual Discovery GetDiscoveryClient(string apiVersion = "2023-09-01") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new Discovery(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of Lineage. + /// The API version to use for this operation. + /// is null. + public virtual Lineage GetLineageClient(string apiVersion = "2023-09-01") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new Lineage(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of Relationship. + public virtual Relationship GetRelationshipClient() + { + return Volatile.Read(ref _cachedRelationship) ?? Interlocked.CompareExchange(ref _cachedRelationship, new Relationship(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint), null) ?? _cachedRelationship; + } + + /// Initializes a new instance of TypeDefinition. + /// The API version to use for this operation. + public virtual TypeDefinition GetTypeDefinitionClient(string apiVersion = "2023-09-01") + { + return new TypeDefinition(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/DataMapClientOptions.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/DataMapClientOptions.cs new file mode 100644 index 0000000000000..95298168ed12b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/DataMapClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Client options for DataMapClient. + public partial class DataMapClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2023_09_01; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2023-09-01". + V2023_09_01 = 1, + } + + internal string Version { get; } + + /// Initializes new instance of DataMapClientOptions. + public DataMapClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2023_09_01 => "2023-09-01", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs new file mode 100644 index 0000000000000..c11afbd53a001 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Purview.DataMap +{ + // Data plane generated sub-client. + /// The Discovery sub-client. + public partial class Discovery + { + private static readonly string[] AuthorizationScopes = new string[] { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of Discovery for mocking. + protected Discovery() + { + } + + /// Initializes a new instance of Discovery. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// The to use. + /// The API version to use for this operation. + internal Discovery(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get data using search. + /// The search query of advanced search request. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> QueryAsync(QueryConfig queryConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(queryConfig, nameof(queryConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = queryConfig.ToRequestContent(); + Response response = await QueryAsync(content, context).ConfigureAwait(false); + return Response.FromValue(QueryResult.FromResponse(response), response); + } + + /// Get data using search. + /// The search query of advanced search request. + /// The cancellation token to use. + /// is null. + /// + public virtual Response Query(QueryConfig queryConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(queryConfig, nameof(queryConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = queryConfig.ToRequestContent(); + Response response = Query(content, context); + return Response.FromValue(QueryResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get data using search. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task QueryAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Discovery.Query"); + scope.Start(); + try + { + using HttpMessage message = CreateQueryRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get data using search. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Query(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Discovery.Query"); + scope.Start(); + try + { + using HttpMessage message = CreateQueryRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get search suggestions by query criteria. + /// The payload of suggest request. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> SuggestAsync(SuggestConfig suggestConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(suggestConfig, nameof(suggestConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = suggestConfig.ToRequestContent(); + Response response = await SuggestAsync(content, context).ConfigureAwait(false); + return Response.FromValue(SuggestResult.FromResponse(response), response); + } + + /// Get search suggestions by query criteria. + /// The payload of suggest request. + /// The cancellation token to use. + /// is null. + /// + public virtual Response Suggest(SuggestConfig suggestConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(suggestConfig, nameof(suggestConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = suggestConfig.ToRequestContent(); + Response response = Suggest(content, context); + return Response.FromValue(SuggestResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get search suggestions by query criteria. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task SuggestAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Discovery.Suggest"); + scope.Start(); + try + { + using HttpMessage message = CreateSuggestRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get search suggestions by query criteria. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Suggest(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Discovery.Suggest"); + scope.Start(); + try + { + using HttpMessage message = CreateSuggestRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get auto complete options. + /// The payload of autocomplete request. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> AutoCompleteAsync(AutoCompleteConfig autoCompleteConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(autoCompleteConfig, nameof(autoCompleteConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = autoCompleteConfig.ToRequestContent(); + Response response = await AutoCompleteAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AutoCompleteResult.FromResponse(response), response); + } + + /// Get auto complete options. + /// The payload of autocomplete request. + /// The cancellation token to use. + /// is null. + /// + public virtual Response AutoComplete(AutoCompleteConfig autoCompleteConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(autoCompleteConfig, nameof(autoCompleteConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = autoCompleteConfig.ToRequestContent(); + Response response = AutoComplete(content, context); + return Response.FromValue(AutoCompleteResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get auto complete options. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AutoCompleteAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Discovery.AutoComplete"); + scope.Start(); + try + { + using HttpMessage message = CreateAutoCompleteRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get auto complete options. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AutoComplete(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Discovery.AutoComplete"); + scope.Start(); + try + { + using HttpMessage message = CreateAutoCompleteRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateQueryRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/search/query", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateSuggestRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/search/suggest", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAutoCompleteRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/search/autocomplete", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml new file mode 100644 index 0000000000000..1095890f2913b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml @@ -0,0 +1,593 @@ + + + + + +This sample shows how to call QueryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig queryConfig = new QueryConfig(); +Response response = await client.QueryAsync(queryConfig); +]]> +This sample shows how to call QueryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig queryConfig = new QueryConfig +{ + Keywords = "", + Limit = 1234, + ContinuationToken = "", + Orderby = { BinaryData.FromObjectAsJson(new object()) }, + Filter = BinaryData.FromObjectAsJson(new object()), + Facets = {new SearchFacetItem + { + Count = 1234, + Facet = "", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Ascend, + Value = SearchSortOrder.Ascend, + }, + }}, + TaxonomySetting = new SearchTaxonomySetting + { + AssetTypes = { "" }, + Facet = default, + }, +}; +Response response = await client.QueryAsync(queryConfig); +]]> + + + +This sample shows how to call Query. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig queryConfig = new QueryConfig(); +Response response = client.Query(queryConfig); +]]> +This sample shows how to call Query with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +QueryConfig queryConfig = new QueryConfig +{ + Keywords = "", + Limit = 1234, + ContinuationToken = "", + Orderby = { BinaryData.FromObjectAsJson(new object()) }, + Filter = BinaryData.FromObjectAsJson(new object()), + Facets = {new SearchFacetItem + { + Count = 1234, + Facet = "", + Sort = new SearchFacetSort + { + Count = SearchSortOrder.Ascend, + Value = SearchSortOrder.Ascend, + }, + }}, + TaxonomySetting = new SearchTaxonomySetting + { + AssetTypes = { "" }, + Facet = default, + }, +}; +Response response = client.Query(queryConfig); +]]> + + + +This sample shows how to call QueryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call QueryAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 1234, + continuationToken = "", + orderby = new object[] + { + new object() + }, + filter = new object(), + facets = new object[] + { + new + { + count = 1234, + facet = "", + sort = new + { + count = "asc", + value = "asc", + }, + } + }, + taxonomySetting = new + { + assetTypes = new object[] + { + "" + }, + }, +}); +Response response = await client.QueryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("@search.count").ToString()); +Console.WriteLine(result.GetProperty("@search.count.approximate").ToString()); +Console.WriteLine(result.GetProperty("continuationToken").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("id")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("qualifiedName")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("name")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("description")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("entityType")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); +]]> + + + +This sample shows how to call Query and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Query with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 1234, + continuationToken = "", + orderby = new object[] + { + new object() + }, + filter = new object(), + facets = new object[] + { + new + { + count = 1234, + facet = "", + sort = new + { + count = "asc", + value = "asc", + }, + } + }, + taxonomySetting = new + { + assetTypes = new object[] + { + "" + }, + }, +}); +Response response = client.Query(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("@search.count").ToString()); +Console.WriteLine(result.GetProperty("@search.count.approximate").ToString()); +Console.WriteLine(result.GetProperty("continuationToken").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("id")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("qualifiedName")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("name")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("description")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("entityType")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); +]]> + + + +This sample shows how to call SuggestAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +SuggestConfig suggestConfig = new SuggestConfig(); +Response response = await client.SuggestAsync(suggestConfig); +]]> +This sample shows how to call SuggestAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +SuggestConfig suggestConfig = new SuggestConfig +{ + Keywords = "", + Limit = 1234, + Filter = BinaryData.FromObjectAsJson(new object()), +}; +Response response = await client.SuggestAsync(suggestConfig); +]]> + + + +This sample shows how to call Suggest. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +SuggestConfig suggestConfig = new SuggestConfig(); +Response response = client.Suggest(suggestConfig); +]]> +This sample shows how to call Suggest with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +SuggestConfig suggestConfig = new SuggestConfig +{ + Keywords = "", + Limit = 1234, + Filter = BinaryData.FromObjectAsJson(new object()), +}; +Response response = client.Suggest(suggestConfig); +]]> + + + +This sample shows how to call SuggestAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.SuggestAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call SuggestAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 1234, + filter = new object(), +}); +Response response = await client.SuggestAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.text").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); +]]> + + + +This sample shows how to call Suggest and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.Suggest(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Suggest with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 1234, + filter = new object(), +}); +Response response = client.Suggest(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.text").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); +]]> + + + +This sample shows how to call AutoCompleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(); +Response response = await client.AutoCompleteAsync(autoCompleteConfig); +]]> +This sample shows how to call AutoCompleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig +{ + Keywords = "", + Limit = 1234, + Filter = BinaryData.FromObjectAsJson(new object()), +}; +Response response = await client.AutoCompleteAsync(autoCompleteConfig); +]]> + + + +This sample shows how to call AutoComplete. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(); +Response response = client.AutoComplete(autoCompleteConfig); +]]> +This sample shows how to call AutoComplete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig +{ + Keywords = "", + Limit = 1234, + Filter = BinaryData.FromObjectAsJson(new object()), +}; +Response response = client.AutoComplete(autoCompleteConfig); +]]> + + + +This sample shows how to call AutoCompleteAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.AutoCompleteAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call AutoCompleteAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 1234, + filter = new object(), +}); +Response response = await client.AutoCompleteAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); +]]> + + + +This sample shows how to call AutoComplete and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.AutoComplete(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call AutoComplete with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + keywords = "", + limit = 1234, + filter = new object(), +}); +Response response = client.AutoComplete(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml new file mode 100644 index 0000000000000..eacacf3ebbb91 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml @@ -0,0 +1,6613 @@ + + + + + +This sample shows how to call CreateOrUpdateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); +Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo); +]]> +This sample shows how to call CreateOrUpdateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo +{ + ReferredEntities = + { + ["key"] = new AtlasEntity + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = {""}, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + } + }, + Entity = default, +}; +Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); +]]> + + + +This sample shows how to call CreateOrUpdate. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); +Response response = client.CreateOrUpdate(atlasEntityWithExtInfo); +]]> +This sample shows how to call CreateOrUpdate with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo +{ + ReferredEntities = + { + ["key"] = new AtlasEntity + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = {""}, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + } + }, + Entity = default, +}; +Response response = client.CreateOrUpdate(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); +]]> + + + +This sample shows how to call CreateOrUpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.CreateOrUpdateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { + "" + }, + meanings = new object[] + { + new + { + confidence = 1234, + createdBy = "", + description = "", + displayText = "", + expression = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DISCOVERED", + steward = "", + termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + } + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + }, + }, +}); +Response response = await client.CreateOrUpdateAsync(content, businessAttributeUpdateBehavior: "ignore", collectionId: ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call CreateOrUpdate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.CreateOrUpdate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { + "" + }, + meanings = new object[] + { + new + { + confidence = 1234, + createdBy = "", + description = "", + displayText = "", + expression = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DISCOVERED", + steward = "", + termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + } + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + }, + }, +}); +Response response = client.CreateOrUpdate(content, businessAttributeUpdateBehavior: "ignore", collectionId: ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call GetByIdsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetByIdsAsync(new string[] { "" }); +]]> +This sample shows how to call GetByIdsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +Response response = await client.GetByIdsAsync(new string[] { "" }, minExtInfo: true, ignoreRelationships: true); +]]> + + + +This sample shows how to call GetByIds. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetByIds(new string[] { "" }); +]]> +This sample shows how to call GetByIds with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +Response response = client.GetByIds(new string[] { "" }, minExtInfo: true, ignoreRelationships: true); +]]> + + + +This sample shows how to call GetByIdsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetByIdsAsync(new string[] { "" }, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByIdsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +Response response = await client.GetByIdsAsync(new string[] { "" }, true, true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +]]> + + + +This sample shows how to call GetByIds and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetByIds(new string[] { "" }, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByIds with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +Response response = client.GetByIds(new string[] { "" }, true, true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +]]> + + + +This sample shows how to call BatchCreateOrUpdateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); +Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo); +]]> +This sample shows how to call BatchCreateOrUpdateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo +{ + ReferredEntities = + { + ["key"] = new AtlasEntity + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = {""}, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + } + }, + Entities = { default }, +}; +Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); +]]> + + + +This sample shows how to call BatchCreateOrUpdate. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); +Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo); +]]> +This sample shows how to call BatchCreateOrUpdate with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo +{ + ReferredEntities = + { + ["key"] = new AtlasEntity + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = {""}, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + } + }, + Entities = { default }, +}; +Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); +]]> + + + +This sample shows how to call BatchCreateOrUpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.BatchCreateOrUpdateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchCreateOrUpdateAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { + "" + }, + meanings = new object[] + { + new + { + confidence = 1234, + createdBy = "", + description = "", + displayText = "", + expression = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DISCOVERED", + steward = "", + termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + } + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + }, + }, + entities = new object[] + { + null + }, +}); +Response response = await client.BatchCreateOrUpdateAsync(content, collectionId: "", businessAttributeUpdateBehavior: "ignore"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call BatchCreateOrUpdate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.BatchCreateOrUpdate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchCreateOrUpdate with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { + "" + }, + meanings = new object[] + { + new + { + confidence = 1234, + createdBy = "", + description = "", + displayText = "", + expression = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DISCOVERED", + steward = "", + termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + } + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + }, + }, + entities = new object[] + { + null + }, +}); +Response response = client.BatchCreateOrUpdate(content, collectionId: "", businessAttributeUpdateBehavior: "ignore"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call BatchDeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.BatchDeleteAsync(new string[] { "" }); +]]> +This sample shows how to call BatchDeleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.BatchDeleteAsync(new string[] { "" }); +]]> + + + +This sample shows how to call BatchDelete. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.BatchDelete(new string[] { "" }); +]]> +This sample shows how to call BatchDelete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.BatchDelete(new string[] { "" }); +]]> + + + +This sample shows how to call BatchDeleteAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.BatchDeleteAsync(new string[] { "" }, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchDeleteAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.BatchDeleteAsync(new string[] { "" }, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call BatchDelete and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.BatchDelete(new string[] { "" }, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchDelete with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.BatchDelete(new string[] { "" }, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call AddClassificationAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); +Response response = await client.AddClassificationAsync(classificationAssociateConfig); +]]> +This sample shows how to call AddClassificationAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig +{ + Classification = new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }, + EntityGuids = { "" }, +}; +Response response = await client.AddClassificationAsync(classificationAssociateConfig); +]]> + + + +This sample shows how to call AddClassification. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); +Response response = client.AddClassification(classificationAssociateConfig); +]]> +This sample shows how to call AddClassification with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig +{ + Classification = new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }, + EntityGuids = { "" }, +}; +Response response = client.AddClassification(classificationAssociateConfig); +]]> + + + +This sample shows how to call AddClassificationAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.AddClassificationAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddClassificationAsync with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + classification = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + }, + entityGuids = new object[] + { + "" + }, +}); +Response response = await client.AddClassificationAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddClassification. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.AddClassification(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddClassification with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + classification = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + }, + entityGuids = new object[] + { + "" + }, +}); +Response response = client.AddClassification(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetEntityAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetEntityAsync(""); +]]> +This sample shows how to call GetEntityAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetEntityAsync("", minExtInfo: true, ignoreRelationships: true); +]]> + + + +This sample shows how to call GetEntity. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetEntity(""); +]]> +This sample shows how to call GetEntity with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetEntity("", minExtInfo: true, ignoreRelationships: true); +]]> + + + +This sample shows how to call GetEntityAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetEntityAsync("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntityAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetEntityAsync("", true, true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +]]> + + + +This sample shows how to call GetEntity and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetEntity("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntity with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetEntity("", true, true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +]]> + + + +This sample shows how to call UpdateAttributeByIdAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.UpdateAttributeByIdAsync("", "", BinaryData.FromObjectAsJson(new object())); +]]> +This sample shows how to call UpdateAttributeByIdAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.UpdateAttributeByIdAsync("", "", BinaryData.FromObjectAsJson(new object())); +]]> + + + +This sample shows how to call UpdateAttributeById. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.UpdateAttributeById("", "", BinaryData.FromObjectAsJson(new object())); +]]> +This sample shows how to call UpdateAttributeById with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.UpdateAttributeById("", "", BinaryData.FromObjectAsJson(new object())); +]]> + + + +This sample shows how to call UpdateAttributeByIdAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateAttributeByIdAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateAttributeByIdAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateAttributeByIdAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call UpdateAttributeById and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateAttributeById("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateAttributeById with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateAttributeById("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call DeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.DeleteAsync(""); +]]> +This sample shows how to call DeleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.DeleteAsync(""); +]]> + + + +This sample shows how to call Delete. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.Delete(""); +]]> +This sample shows how to call Delete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.Delete(""); +]]> + + + +This sample shows how to call DeleteAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.DeleteAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DeleteAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.DeleteAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call Delete and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.Delete("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Delete with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.Delete("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call GetClassificationAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetClassificationAsync("", ""); +]]> +This sample shows how to call GetClassificationAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetClassificationAsync("", ""); +]]> + + + +This sample shows how to call GetClassification. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetClassification("", ""); +]]> +This sample shows how to call GetClassification with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetClassification("", ""); +]]> + + + +This sample shows how to call GetClassificationAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetClassificationAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetClassificationAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +]]> + + + +This sample shows how to call GetClassification and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetClassification("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassification with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetClassification("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +]]> + + + +This sample shows how to call RemoveClassificationAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveClassificationAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveClassificationAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveClassificationAsync("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveClassification. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveClassification("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveClassification with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveClassification("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetClassificationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetClassificationsAsync(""); +]]> +This sample shows how to call GetClassificationsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetClassificationsAsync(""); +]]> + + + +This sample shows how to call GetClassifications. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetClassifications(""); +]]> +This sample shows how to call GetClassifications with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetClassifications(""); +]]> + + + +This sample shows how to call GetClassificationsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetClassificationsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetClassificationsAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("list")[0].ToString()); +Console.WriteLine(result.GetProperty("pageSize").ToString()); +Console.WriteLine(result.GetProperty("sortBy").ToString()); +Console.WriteLine(result.GetProperty("sortType").ToString()); +Console.WriteLine(result.GetProperty("startIndex").ToString()); +Console.WriteLine(result.GetProperty("totalCount").ToString()); +]]> + + + +This sample shows how to call GetClassifications and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetClassifications("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassifications with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetClassifications("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("list")[0].ToString()); +Console.WriteLine(result.GetProperty("pageSize").ToString()); +Console.WriteLine(result.GetProperty("sortBy").ToString()); +Console.WriteLine(result.GetProperty("sortType").ToString()); +Console.WriteLine(result.GetProperty("startIndex").ToString()); +Console.WriteLine(result.GetProperty("totalCount").ToString()); +]]> + + + +This sample shows how to call AddClassificationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddClassificationsAsync("", new AtlasClassification[] +{ + new AtlasClassification() +}); +]]> +This sample shows how to call AddClassificationsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddClassificationsAsync("", new AtlasClassification[] +{ + new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + } +}); +]]> + + + +This sample shows how to call AddClassifications. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddClassifications("", new AtlasClassification[] +{ + new AtlasClassification() +}); +]]> +This sample shows how to call AddClassifications with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddClassifications("", new AtlasClassification[] +{ + new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + } +}); +]]> + + + +This sample shows how to call AddClassificationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = await client.AddClassificationsAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddClassificationsAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } +}); +Response response = await client.AddClassificationsAsync("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddClassifications. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = client.AddClassifications("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddClassifications with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } +}); +Response response = client.AddClassifications("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdateClassificationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.UpdateClassificationsAsync("", new AtlasClassification[] +{ + new AtlasClassification() +}); +]]> +This sample shows how to call UpdateClassificationsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.UpdateClassificationsAsync("", new AtlasClassification[] +{ + new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + } +}); +]]> + + + +This sample shows how to call UpdateClassifications. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.UpdateClassifications("", new AtlasClassification[] +{ + new AtlasClassification() +}); +]]> +This sample shows how to call UpdateClassifications with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.UpdateClassifications("", new AtlasClassification[] +{ + new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + } +}); +]]> + + + +This sample shows how to call UpdateClassificationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = await client.UpdateClassificationsAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdateClassificationsAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } +}); +Response response = await client.UpdateClassificationsAsync("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdateClassifications. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = client.UpdateClassifications("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdateClassifications with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } +}); +Response response = client.UpdateClassifications("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetByUniqueAttributeAsync(""); +]]> +This sample shows how to call GetByUniqueAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetByUniqueAttributeAsync("", minExtInfo: true, ignoreRelationships: true, attribute: ""); +]]> + + + +This sample shows how to call GetByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetByUniqueAttribute(""); +]]> +This sample shows how to call GetByUniqueAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetByUniqueAttribute("", minExtInfo: true, ignoreRelationships: true, attribute: ""); +]]> + + + +This sample shows how to call GetByUniqueAttributeAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetByUniqueAttributeAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByUniqueAttributeAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetByUniqueAttributeAsync("", true, true, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +]]> + + + +This sample shows how to call GetByUniqueAttribute and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetByUniqueAttribute("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByUniqueAttribute with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetByUniqueAttribute("", true, true, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +]]> + + + +This sample shows how to call UpdateByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); +Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo); +]]> +This sample shows how to call UpdateByUniqueAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo +{ + ReferredEntities = + { + ["key"] = new AtlasEntity + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = {""}, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + } + }, + Entity = default, +}; +Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo, attribute: ""); +]]> + + + +This sample shows how to call UpdateByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); +Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo); +]]> +This sample shows how to call UpdateByUniqueAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo +{ + ReferredEntities = + { + ["key"] = new AtlasEntity + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = {""}, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + } + }, + Entity = default, +}; +Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo, attribute: ""); +]]> + + + +This sample shows how to call UpdateByUniqueAttributeAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateByUniqueAttributeAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateByUniqueAttributeAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { + "" + }, + meanings = new object[] + { + new + { + confidence = 1234, + createdBy = "", + description = "", + displayText = "", + expression = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DISCOVERED", + steward = "", + termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + } + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + }, + }, +}); +Response response = await client.UpdateByUniqueAttributeAsync("", content, attribute: ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call UpdateByUniqueAttribute and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateByUniqueAttribute("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateByUniqueAttribute with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { + "" + }, + meanings = new object[] + { + new + { + confidence = 1234, + createdBy = "", + description = "", + displayText = "", + expression = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DISCOVERED", + steward = "", + termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + } + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + }, + }, +}); +Response response = client.UpdateByUniqueAttribute("", content, attribute: ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call DeleteByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.DeleteByUniqueAttributeAsync(""); +]]> +This sample shows how to call DeleteByUniqueAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.DeleteByUniqueAttributeAsync("", attribute: ""); +]]> + + + +This sample shows how to call DeleteByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.DeleteByUniqueAttribute(""); +]]> +This sample shows how to call DeleteByUniqueAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.DeleteByUniqueAttribute("", attribute: ""); +]]> + + + +This sample shows how to call DeleteByUniqueAttributeAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.DeleteByUniqueAttributeAsync("", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DeleteByUniqueAttributeAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.DeleteByUniqueAttributeAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call DeleteByUniqueAttribute and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.DeleteByUniqueAttribute("", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call DeleteByUniqueAttribute with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.DeleteByUniqueAttribute("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call RemoveClassificationByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveClassificationByUniqueAttributeAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveClassificationByUniqueAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveClassificationByUniqueAttributeAsync("", "", attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveClassificationByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveClassificationByUniqueAttribute("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveClassificationByUniqueAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveClassificationByUniqueAttribute("", "", attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddClassificationsByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddClassificationsByUniqueAttributeAsync("", new AtlasClassification[] +{ + new AtlasClassification() +}); +]]> +This sample shows how to call AddClassificationsByUniqueAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddClassificationsByUniqueAttributeAsync("", new AtlasClassification[] +{ + new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + } +}, attribute: ""); +]]> + + + +This sample shows how to call AddClassificationsByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddClassificationsByUniqueAttribute("", new AtlasClassification[] +{ + new AtlasClassification() +}); +]]> +This sample shows how to call AddClassificationsByUniqueAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddClassificationsByUniqueAttribute("", new AtlasClassification[] +{ + new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + } +}, attribute: ""); +]]> + + + +This sample shows how to call AddClassificationsByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = await client.AddClassificationsByUniqueAttributeAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddClassificationsByUniqueAttributeAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } +}); +Response response = await client.AddClassificationsByUniqueAttributeAsync("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddClassificationsByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = client.AddClassificationsByUniqueAttribute("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddClassificationsByUniqueAttribute with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } +}); +Response response = client.AddClassificationsByUniqueAttribute("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdateClassificationsUniqueByAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", new AtlasClassification[] +{ + new AtlasClassification() +}); +]]> +This sample shows how to call UpdateClassificationsUniqueByAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", new AtlasClassification[] +{ + new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + } +}, attribute: ""); +]]> + + + +This sample shows how to call UpdateClassificationsUniqueByAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.UpdateClassificationsUniqueByAttribute("", new AtlasClassification[] +{ + new AtlasClassification() +}); +]]> +This sample shows how to call UpdateClassificationsUniqueByAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.UpdateClassificationsUniqueByAttribute("", new AtlasClassification[] +{ + new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + } +}, attribute: ""); +]]> + + + +This sample shows how to call UpdateClassificationsUniqueByAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdateClassificationsUniqueByAttributeAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } +}); +Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdateClassificationsUniqueByAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = client.UpdateClassificationsUniqueByAttribute("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdateClassificationsUniqueByAttribute with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } +}); +Response response = client.UpdateClassificationsUniqueByAttribute("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call BatchSetClassificationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); +Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); +]]> +This sample shows how to call BatchSetClassificationsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders +{ + GuidHeaderMap = + { + ["key"] = new AtlasEntityHeader + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + ClassificationNames = {""}, + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + DisplayText = "", + Guid = "", + IsIncomplete = true, + Labels = {""}, + MeaningNames = {""}, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + Status = EntityStatus.Active, + } + }, +}; +Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); +]]> + + + +This sample shows how to call BatchSetClassifications. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); +Response> response = client.BatchSetClassifications(atlasEntityHeaders); +]]> +This sample shows how to call BatchSetClassifications with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders +{ + GuidHeaderMap = + { + ["key"] = new AtlasEntityHeader + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + ClassificationNames = {""}, + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + DisplayText = "", + Guid = "", + IsIncomplete = true, + Labels = {""}, + MeaningNames = {""}, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + Status = EntityStatus.Active, + } + }, +}; +Response> response = client.BatchSetClassifications(atlasEntityHeaders); +]]> + + + +This sample shows how to call BatchSetClassificationsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.BatchSetClassificationsAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call BatchSetClassificationsAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + guidHeaderMap = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + classificationNames = new object[] + { + "" + }, + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + displayText = "", + guid = "", + isIncomplete = true, + labels = new object[] + { + "" + }, + meaningNames = new object[] + { + "" + }, + meanings = new object[] + { + new + { + confidence = 1234, + createdBy = "", + description = "", + displayText = "", + expression = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DISCOVERED", + steward = "", + termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + } + }, + status = "ACTIVE", + }, + }, +}); +Response response = await client.BatchSetClassificationsAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> + + + +This sample shows how to call BatchSetClassifications and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.BatchSetClassifications(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call BatchSetClassifications with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + guidHeaderMap = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + classificationNames = new object[] + { + "" + }, + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + displayText = "", + guid = "", + isIncomplete = true, + labels = new object[] + { + "" + }, + meaningNames = new object[] + { + "" + }, + meanings = new object[] + { + new + { + confidence = 1234, + createdBy = "", + description = "", + displayText = "", + expression = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DISCOVERED", + steward = "", + termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + } + }, + status = "ACTIVE", + }, + }, +}); +Response response = client.BatchSetClassifications(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> + + + +This sample shows how to call BatchGetByUniqueAttributesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.BatchGetByUniqueAttributesAsync(""); +]]> +This sample shows how to call BatchGetByUniqueAttributesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.BatchGetByUniqueAttributesAsync("", minExtInfo: true, ignoreRelationships: true, attrNQualifiedName: ""); +]]> + + + +This sample shows how to call BatchGetByUniqueAttributes. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.BatchGetByUniqueAttributes(""); +]]> +This sample shows how to call BatchGetByUniqueAttributes with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.BatchGetByUniqueAttributes("", minExtInfo: true, ignoreRelationships: true, attrNQualifiedName: ""); +]]> + + + +This sample shows how to call BatchGetByUniqueAttributesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.BatchGetByUniqueAttributesAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchGetByUniqueAttributesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.BatchGetByUniqueAttributesAsync("", true, true, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +]]> + + + +This sample shows how to call BatchGetByUniqueAttributes and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.BatchGetByUniqueAttributes("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchGetByUniqueAttributes with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.BatchGetByUniqueAttributes("", true, true, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +]]> + + + +This sample shows how to call GetHeaderAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetHeaderAsync(""); +]]> +This sample shows how to call GetHeaderAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetHeaderAsync(""); +]]> + + + +This sample shows how to call GetHeader. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetHeader(""); +]]> +This sample shows how to call GetHeader with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetHeader(""); +]]> + + + +This sample shows how to call GetHeaderAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetHeaderAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetHeaderAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetHeaderAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> + + + +This sample shows how to call GetHeader and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetHeader("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetHeader with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetHeader("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> + + + +This sample shows how to call RemoveBusinessMetadataAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveBusinessMetadataAsync("", new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}); +]]> +This sample shows how to call RemoveBusinessMetadataAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveBusinessMetadataAsync("", new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}); +]]> + + + +This sample shows how to call RemoveBusinessMetadata. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveBusinessMetadata("", new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}); +]]> +This sample shows how to call RemoveBusinessMetadata with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveBusinessMetadata("", new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}); +]]> + + + +This sample shows how to call RemoveBusinessMetadataAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new + { + key = new object(), + }, +}); +Response response = await client.RemoveBusinessMetadataAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveBusinessMetadataAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new + { + key = new object(), + }, +}); +Response response = await client.RemoveBusinessMetadataAsync("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveBusinessMetadata. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new + { + key = new object(), + }, +}); +Response response = client.RemoveBusinessMetadata("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveBusinessMetadata with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new + { + key = new object(), + }, +}); +Response response = client.RemoveBusinessMetadata("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddOrUpdateBusinessMetadataAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddOrUpdateBusinessMetadataAsync("", new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}); +]]> +This sample shows how to call AddOrUpdateBusinessMetadataAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddOrUpdateBusinessMetadataAsync("", new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}, overwrite: true); +]]> + + + +This sample shows how to call AddOrUpdateBusinessMetadata. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddOrUpdateBusinessMetadata("", new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}); +]]> +This sample shows how to call AddOrUpdateBusinessMetadata with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddOrUpdateBusinessMetadata("", new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}, overwrite: true); +]]> + + + +This sample shows how to call AddOrUpdateBusinessMetadataAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new + { + key = new object(), + }, +}); +Response response = await client.AddOrUpdateBusinessMetadataAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddOrUpdateBusinessMetadataAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new + { + key = new object(), + }, +}); +Response response = await client.AddOrUpdateBusinessMetadataAsync("", content, overwrite: true); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddOrUpdateBusinessMetadata. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new + { + key = new object(), + }, +}); +Response response = client.AddOrUpdateBusinessMetadata("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddOrUpdateBusinessMetadata with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new + { + key = new object(), + }, +}); +Response response = client.AddOrUpdateBusinessMetadata("", content, overwrite: true); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveBusinessMetadataAttributesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}); +]]> +This sample shows how to call RemoveBusinessMetadataAttributesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}); +]]> + + + +This sample shows how to call RemoveBusinessMetadataAttributes. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveBusinessMetadataAttributes("", "", new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}); +]]> +This sample shows how to call RemoveBusinessMetadataAttributes with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveBusinessMetadataAttributes("", "", new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}); +]]> + + + +This sample shows how to call RemoveBusinessMetadataAttributesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new object(), +}); +Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveBusinessMetadataAttributesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new object(), +}); +Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveBusinessMetadataAttributes. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new object(), +}); +Response response = client.RemoveBusinessMetadataAttributes("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveBusinessMetadataAttributes with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new object(), +}); +Response response = client.RemoveBusinessMetadataAttributes("", "", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}); +]]> +This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}); +]]> + + + +This sample shows how to call AddOrUpdateBusinessMetadataAttributes. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}); +]]> +This sample shows how to call AddOrUpdateBusinessMetadataAttributes with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}); +]]> + + + +This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new object(), +}); +Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddOrUpdateBusinessMetadataAttributesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new object(), +}); +Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddOrUpdateBusinessMetadataAttributes. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new object(), +}); +Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddOrUpdateBusinessMetadataAttributes with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = new object(), +}); +Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetBusinessMetadataTemplateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetBusinessMetadataTemplateAsync(); +]]> +This sample shows how to call GetBusinessMetadataTemplateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetBusinessMetadataTemplateAsync(); +]]> + + + +This sample shows how to call GetBusinessMetadataTemplate. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetBusinessMetadataTemplate(); +]]> +This sample shows how to call GetBusinessMetadataTemplate with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetBusinessMetadataTemplate(); +]]> + + + +This sample shows how to call GetBusinessMetadataTemplateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetBusinessMetadataTemplateAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataTemplateAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.GetBusinessMetadataTemplateAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call GetBusinessMetadataTemplate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetBusinessMetadataTemplate(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataTemplate with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.GetBusinessMetadataTemplate(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call ImportBusinessMetadataAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.ImportBusinessMetadataAsync(BinaryData.FromObjectAsJson(new object())); +]]> +This sample shows how to call ImportBusinessMetadataAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.ImportBusinessMetadataAsync(BinaryData.FromObjectAsJson(new object())); +]]> + + + +This sample shows how to call ImportBusinessMetadata. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.ImportBusinessMetadata(BinaryData.FromObjectAsJson(new object())); +]]> +This sample shows how to call ImportBusinessMetadata with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.ImportBusinessMetadata(BinaryData.FromObjectAsJson(new object())); +]]> + + + +This sample shows how to call ImportBusinessMetadataAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + file = new object(), +}); +Response response = await client.ImportBusinessMetadataAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ImportBusinessMetadataAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + file = new object(), +}); +Response response = await client.ImportBusinessMetadataAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); +Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("importStatus").ToString()); +Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("parentObjectName").ToString()); +Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("remarks").ToString()); +Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("childObjectName").ToString()); +Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); +Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); +Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); +]]> + + + +This sample shows how to call ImportBusinessMetadata and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + file = new object(), +}); +Response response = client.ImportBusinessMetadata(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ImportBusinessMetadata with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new +{ + file = new object(), +}); +Response response = client.ImportBusinessMetadata(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); +Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("importStatus").ToString()); +Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("parentObjectName").ToString()); +Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("remarks").ToString()); +Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("childObjectName").ToString()); +Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); +Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); +Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); +]]> + + + +This sample shows how to call RemoveLabelsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveLabelsAsync(""); +]]> +This sample shows how to call RemoveLabelsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveLabelsAsync("", body: new string[] { "" }); +]]> + + + +This sample shows how to call RemoveLabels. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveLabels(""); +]]> +This sample shows how to call RemoveLabels with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveLabels("", body: new string[] { "" }); +]]> + + + +This sample shows how to call RemoveLabelsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = await client.RemoveLabelsAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveLabelsAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = await client.RemoveLabelsAsync("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveLabels. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = client.RemoveLabels("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveLabels with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = client.RemoveLabels("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call SetLabelsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.SetLabelsAsync(""); +]]> +This sample shows how to call SetLabelsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.SetLabelsAsync("", body: new string[] { "" }); +]]> + + + +This sample shows how to call SetLabels. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.SetLabels(""); +]]> +This sample shows how to call SetLabels with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.SetLabels("", body: new string[] { "" }); +]]> + + + +This sample shows how to call SetLabelsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = await client.SetLabelsAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetLabelsAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = await client.SetLabelsAsync("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call SetLabels. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = client.SetLabels("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetLabels with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = client.SetLabels("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddLabelAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddLabelAsync(""); +]]> +This sample shows how to call AddLabelAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddLabelAsync("", body: new string[] { "" }); +]]> + + + +This sample shows how to call AddLabel. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddLabel(""); +]]> +This sample shows how to call AddLabel with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddLabel("", body: new string[] { "" }); +]]> + + + +This sample shows how to call AddLabelAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = await client.AddLabelAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddLabelAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = await client.AddLabelAsync("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddLabel. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = client.AddLabel("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddLabel with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = client.AddLabel("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveLabelsByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveLabelsByUniqueAttributeAsync(""); +]]> +This sample shows how to call RemoveLabelsByUniqueAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.RemoveLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); +]]> + + + +This sample shows how to call RemoveLabelsByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveLabelsByUniqueAttribute(""); +]]> +This sample shows how to call RemoveLabelsByUniqueAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.RemoveLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); +]]> + + + +This sample shows how to call RemoveLabelsByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = await client.RemoveLabelsByUniqueAttributeAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveLabelsByUniqueAttributeAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = await client.RemoveLabelsByUniqueAttributeAsync("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveLabelsByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = client.RemoveLabelsByUniqueAttribute("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveLabelsByUniqueAttribute with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = client.RemoveLabelsByUniqueAttribute("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call SetLabelsByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.SetLabelsByUniqueAttributeAsync(""); +]]> +This sample shows how to call SetLabelsByUniqueAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.SetLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); +]]> + + + +This sample shows how to call SetLabelsByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.SetLabelsByUniqueAttribute(""); +]]> +This sample shows how to call SetLabelsByUniqueAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.SetLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); +]]> + + + +This sample shows how to call SetLabelsByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = await client.SetLabelsByUniqueAttributeAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetLabelsByUniqueAttributeAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = await client.SetLabelsByUniqueAttributeAsync("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call SetLabelsByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = client.SetLabelsByUniqueAttribute("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetLabelsByUniqueAttribute with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = client.SetLabelsByUniqueAttribute("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddLabelsByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddLabelsByUniqueAttributeAsync(""); +]]> +This sample shows how to call AddLabelsByUniqueAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = await client.AddLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); +]]> + + + +This sample shows how to call AddLabelsByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddLabelsByUniqueAttribute(""); +]]> +This sample shows how to call AddLabelsByUniqueAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +Response response = client.AddLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); +]]> + + + +This sample shows how to call AddLabelsByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = await client.AddLabelsByUniqueAttributeAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddLabelsByUniqueAttributeAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = await client.AddLabelsByUniqueAttributeAsync("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddLabelsByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = null; +Response response = client.AddLabelsByUniqueAttribute("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddLabelsByUniqueAttribute with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + "" +}); +Response response = client.AddLabelsByUniqueAttribute("", content, attribute: ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call MoveEntitiesToCollectionAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(); +Response response = await client.MoveEntitiesToCollectionAsync("", moveEntitiesConfig); +]]> +This sample shows how to call MoveEntitiesToCollectionAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig +{ + EntityGuids = { "" }, +}; +Response response = await client.MoveEntitiesToCollectionAsync("", moveEntitiesConfig); +]]> + + + +This sample shows how to call MoveEntitiesToCollection. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(); +Response response = client.MoveEntitiesToCollection("", moveEntitiesConfig); +]]> +This sample shows how to call MoveEntitiesToCollection with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig +{ + EntityGuids = { "" }, +}; +Response response = client.MoveEntitiesToCollection("", moveEntitiesConfig); +]]> + + + +This sample shows how to call MoveEntitiesToCollectionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.MoveEntitiesToCollectionAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call MoveEntitiesToCollectionAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + entityGuids = new object[] + { + "" + }, +}); +Response response = await client.MoveEntitiesToCollectionAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + +This sample shows how to call MoveEntitiesToCollection and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.MoveEntitiesToCollection("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call MoveEntitiesToCollection with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + entityGuids = new object[] + { + "" + }, +}); +Response response = client.MoveEntitiesToCollection("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml new file mode 100644 index 0000000000000..49baec132e30e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml @@ -0,0 +1,9047 @@ + + + + + +This sample shows how to call BatchGetAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.BatchGetAsync(); +]]> +This sample shows how to call BatchGetAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response> response = await client.BatchGetAsync(limit: 1234, offset: 1234, sort: "", ignoreTermsAndCategories: true); +]]> + + + +This sample shows how to call BatchGet. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.BatchGet(); +]]> +This sample shows how to call BatchGet with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response> response = client.BatchGet(limit: 1234, offset: 1234, sort: "", ignoreTermsAndCategories: true); +]]> + + + +This sample shows how to call BatchGetAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.BatchGetAsync(null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call BatchGetAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = await client.BatchGetAsync(1234, 1234, "", true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("language").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call BatchGet and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.BatchGet(null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call BatchGet with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = client.BatchGet(1234, 1234, "", true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("language").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call CreateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossary atlasGlossary = new AtlasGlossary(); +Response response = await client.CreateAsync(atlasGlossary); +]]> +This sample shows how to call CreateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossary atlasGlossary = new AtlasGlossary +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Categories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + Language = "", + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Usage = "", +}; +Response response = await client.CreateAsync(atlasGlossary); +]]> + + + +This sample shows how to call Create. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossary atlasGlossary = new AtlasGlossary(); +Response response = client.Create(atlasGlossary); +]]> +This sample shows how to call Create with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossary atlasGlossary = new AtlasGlossary +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Categories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + Language = "", + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Usage = "", +}; +Response response = client.Create(atlasGlossary); +]]> + + + +This sample shows how to call CreateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.CreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + categories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + language = "", + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + usage = "", +}); +Response response = await client.CreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call Create and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.Create(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Create with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + categories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + language = "", + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + usage = "", +}); +Response response = client.Create(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call CreateCategoriesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.CreateCategoriesAsync(new AtlasGlossaryCategory[] +{ + new AtlasGlossaryCategory() +}); +]]> +This sample shows how to call CreateCategoriesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.CreateCategoriesAsync(new AtlasGlossaryCategory[] +{ + new AtlasGlossaryCategory + { + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + } +}); +]]> + + + +This sample shows how to call CreateCategories. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.CreateCategories(new AtlasGlossaryCategory[] +{ + new AtlasGlossaryCategory() +}); +]]> +This sample shows how to call CreateCategories with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.CreateCategories(new AtlasGlossaryCategory[] +{ + new AtlasGlossaryCategory + { + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + } +}); +]]> + + + +This sample shows how to call CreateCategoriesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = await client.CreateCategoriesAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call CreateCategoriesAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + } +}); +Response response = await client.CreateCategoriesAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call CreateCategories and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = client.CreateCategories(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call CreateCategories with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + } +}); +Response response = client.CreateCategories(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call CreateCategoryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); +Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); +]]> +This sample shows how to call CreateCategoryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, +}; +Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); +]]> + + + +This sample shows how to call CreateCategory. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); +Response response = client.CreateCategory(atlasGlossaryCategory); +]]> +This sample shows how to call CreateCategory with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, +}; +Response response = client.CreateCategory(atlasGlossaryCategory); +]]> + + + +This sample shows how to call CreateCategoryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.CreateCategoryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateCategoryAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, +}); +Response response = await client.CreateCategoryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call CreateCategory and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.CreateCategory(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateCategory with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, +}); +Response response = client.CreateCategory(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetCategoryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoryAsync(""); +]]> +This sample shows how to call GetCategoryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoryAsync(""); +]]> + + + +This sample shows how to call GetCategory. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategory(""); +]]> +This sample shows how to call GetCategory with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategory(""); +]]> + + + +This sample shows how to call GetCategoryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoryAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCategoryAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoryAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetCategory and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategory("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetCategory with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategory("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call UpdateCategoryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); +Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); +]]> +This sample shows how to call UpdateCategoryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, +}; +Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); +]]> + + + +This sample shows how to call UpdateCategory. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); +Response response = client.UpdateCategory("", atlasGlossaryCategory); +]]> +This sample shows how to call UpdateCategory with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, +}; +Response response = client.UpdateCategory("", atlasGlossaryCategory); +]]> + + + +This sample shows how to call UpdateCategoryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateCategoryAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateCategoryAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, +}); +Response response = await client.UpdateCategoryAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call UpdateCategory and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateCategory("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateCategory with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, +}); +Response response = client.UpdateCategory("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call DeleteCategoryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.DeleteCategoryAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteCategoryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.DeleteCategoryAsync(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteCategory. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.DeleteCategory(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteCategory with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.DeleteCategory(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call PartialUpdateCategoryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.PartialUpdateCategoryAsync("", new Dictionary +{ + ["key"] = "" +}); +]]> +This sample shows how to call PartialUpdateCategoryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.PartialUpdateCategoryAsync("", new Dictionary +{ + ["key"] = "" +}); +]]> + + + +This sample shows how to call PartialUpdateCategory. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.PartialUpdateCategory("", new Dictionary +{ + ["key"] = "" +}); +]]> +This sample shows how to call PartialUpdateCategory with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.PartialUpdateCategory("", new Dictionary +{ + ["key"] = "" +}); +]]> + + + +This sample shows how to call PartialUpdateCategoryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = await client.PartialUpdateCategoryAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdateCategoryAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = await client.PartialUpdateCategoryAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call PartialUpdateCategory and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = client.PartialUpdateCategory("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdateCategory with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = client.PartialUpdateCategory("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetRelatedCategoriesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response>> response = await client.GetRelatedCategoriesAsync(""); +]]> +This sample shows how to call GetRelatedCategoriesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response>> response = await client.GetRelatedCategoriesAsync("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetRelatedCategories. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response>> response = client.GetRelatedCategories(""); +]]> +This sample shows how to call GetRelatedCategories with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response>> response = client.GetRelatedCategories("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetRelatedCategoriesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetRelatedCategoriesAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].ToString()); +]]> +This sample shows how to call GetRelatedCategoriesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetRelatedCategoriesAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +]]> + + + +This sample shows how to call GetRelatedCategories and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetRelatedCategories("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].ToString()); +]]> +This sample shows how to call GetRelatedCategories with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetRelatedCategories("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +]]> + + + +This sample shows how to call GetCategoryTermsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetCategoryTermsAsync(""); +]]> +This sample shows how to call GetCategoryTermsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetCategoryTermsAsync("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetCategoryTerms. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetCategoryTerms(""); +]]> +This sample shows how to call GetCategoryTerms with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetCategoryTerms("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetCategoryTermsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoryTermsAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetCategoryTermsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoryTermsAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetCategoryTerms and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategoryTerms("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetCategoryTerms with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategoryTerms("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call CreateTermAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); +Response response = await client.CreateTermAsync(atlasGlossaryTerm); +]]> +This sample shows how to call CreateTermAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Name = "", + DisplayText = "", + ItemPath = "", + ResourceId = "", + Properties = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }}, + Resources = {new ResourceLink + { + DisplayName = "", + Url = "", + }}, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + Attributes = + { + ["key"] = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, + AssignedEntities = {new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + }}, + Categories = {new AtlasTermCategorizationHeader + { + CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Description = "", + DisplayText = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermRelationshipStatus.Draft, + }}, + Classifies = { default }, + Examples = { "" }, + IsA = { default }, + PreferredTerms = { default }, + PreferredToTerms = { default }, + ReplacedBy = { default }, + ReplacementTerms = { default }, + SeeAlso = { default }, + Synonyms = { default }, + TranslatedTerms = { default }, + TranslationTerms = { default }, + Usage = "", + ValidValues = { default }, + ValidValuesFor = { default }, +}; +Response response = await client.CreateTermAsync(atlasGlossaryTerm, includeTermHierarchy: true); +]]> + + + +This sample shows how to call CreateTerm. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); +Response response = client.CreateTerm(atlasGlossaryTerm); +]]> +This sample shows how to call CreateTerm with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Name = "", + DisplayText = "", + ItemPath = "", + ResourceId = "", + Properties = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }}, + Resources = {new ResourceLink + { + DisplayName = "", + Url = "", + }}, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + Attributes = + { + ["key"] = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, + AssignedEntities = {new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + }}, + Categories = {new AtlasTermCategorizationHeader + { + CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Description = "", + DisplayText = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermRelationshipStatus.Draft, + }}, + Classifies = { default }, + Examples = { "" }, + IsA = { default }, + PreferredTerms = { default }, + PreferredToTerms = { default }, + ReplacedBy = { default }, + ReplacementTerms = { default }, + SeeAlso = { default }, + Synonyms = { default }, + TranslatedTerms = { default }, + TranslationTerms = { default }, + Usage = "", + ValidValues = { default }, + ValidValuesFor = { default }, +}; +Response response = client.CreateTerm(atlasGlossaryTerm, includeTermHierarchy: true); +]]> + + + +This sample shows how to call CreateTermAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.CreateTermAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateTermAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { + new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + name = "", + displayText = "", + itemPath = "", + resourceId = "", + properties = new + { + key = new object(), + }, + } + }, + resources = new object[] + { + new + { + displayName = "", + url = "", + } + }, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } + }, + categories = new object[] + { + new + { + categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + description = "", + displayText = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DRAFT", + } + }, + classifies = new object[] + { + null + }, + examples = new object[] + { + "" + }, + isA = new object[] + { + null + }, + preferredTerms = new object[] + { + null + }, + preferredToTerms = new object[] + { + null + }, + replacedBy = new object[] + { + null + }, + replacementTerms = new object[] + { + null + }, + seeAlso = new object[] + { + null + }, + synonyms = new object[] + { + null + }, + translatedTerms = new object[] + { + null + }, + translationTerms = new object[] + { + null + }, + usage = "", + validValues = new object[] + { + null + }, + validValuesFor = new object[] + { + null + }, +}); +Response response = await client.CreateTermAsync(content, includeTermHierarchy: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call CreateTerm and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.CreateTerm(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateTerm with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { + new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + name = "", + displayText = "", + itemPath = "", + resourceId = "", + properties = new + { + key = new object(), + }, + } + }, + resources = new object[] + { + new + { + displayName = "", + url = "", + } + }, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } + }, + categories = new object[] + { + new + { + categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + description = "", + displayText = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DRAFT", + } + }, + classifies = new object[] + { + null + }, + examples = new object[] + { + "" + }, + isA = new object[] + { + null + }, + preferredTerms = new object[] + { + null + }, + preferredToTerms = new object[] + { + null + }, + replacedBy = new object[] + { + null + }, + replacementTerms = new object[] + { + null + }, + seeAlso = new object[] + { + null + }, + synonyms = new object[] + { + null + }, + translatedTerms = new object[] + { + null + }, + translationTerms = new object[] + { + null + }, + usage = "", + validValues = new object[] + { + null + }, + validValuesFor = new object[] + { + null + }, +}); +Response response = client.CreateTerm(content, includeTermHierarchy: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetTermAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetTermAsync(""); +]]> +This sample shows how to call GetTermAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermAsync(""); +]]> + + + +This sample shows how to call GetTerm. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetTerm(""); +]]> +This sample shows how to call GetTerm with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = client.GetTerm(""); +]]> + + + +This sample shows how to call GetTermAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetTermAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTermAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetTerm and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetTerm("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTerm with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = client.GetTerm("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call UpdateTermAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); +Response response = await client.UpdateTermAsync("", atlasGlossaryTerm); +]]> +This sample shows how to call UpdateTermAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Name = "", + DisplayText = "", + ItemPath = "", + ResourceId = "", + Properties = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }}, + Resources = {new ResourceLink + { + DisplayName = "", + Url = "", + }}, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + Attributes = + { + ["key"] = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, + AssignedEntities = {new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + }}, + Categories = {new AtlasTermCategorizationHeader + { + CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Description = "", + DisplayText = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermRelationshipStatus.Draft, + }}, + Classifies = { default }, + Examples = { "" }, + IsA = { default }, + PreferredTerms = { default }, + PreferredToTerms = { default }, + ReplacedBy = { default }, + ReplacementTerms = { default }, + SeeAlso = { default }, + Synonyms = { default }, + TranslatedTerms = { default }, + TranslationTerms = { default }, + Usage = "", + ValidValues = { default }, + ValidValuesFor = { default }, +}; +Response response = await client.UpdateTermAsync("", atlasGlossaryTerm, includeTermHierarchy: true); +]]> + + + +This sample shows how to call UpdateTerm. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); +Response response = client.UpdateTerm("", atlasGlossaryTerm); +]]> +This sample shows how to call UpdateTerm with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Name = "", + DisplayText = "", + ItemPath = "", + ResourceId = "", + Properties = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }}, + Resources = {new ResourceLink + { + DisplayName = "", + Url = "", + }}, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + Attributes = + { + ["key"] = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, + AssignedEntities = {new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + }}, + Categories = {new AtlasTermCategorizationHeader + { + CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Description = "", + DisplayText = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermRelationshipStatus.Draft, + }}, + Classifies = { default }, + Examples = { "" }, + IsA = { default }, + PreferredTerms = { default }, + PreferredToTerms = { default }, + ReplacedBy = { default }, + ReplacementTerms = { default }, + SeeAlso = { default }, + Synonyms = { default }, + TranslatedTerms = { default }, + TranslationTerms = { default }, + Usage = "", + ValidValues = { default }, + ValidValuesFor = { default }, +}; +Response response = client.UpdateTerm("", atlasGlossaryTerm, includeTermHierarchy: true); +]]> + + + +This sample shows how to call UpdateTermAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateTermAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateTermAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { + new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + name = "", + displayText = "", + itemPath = "", + resourceId = "", + properties = new + { + key = new object(), + }, + } + }, + resources = new object[] + { + new + { + displayName = "", + url = "", + } + }, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } + }, + categories = new object[] + { + new + { + categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + description = "", + displayText = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DRAFT", + } + }, + classifies = new object[] + { + null + }, + examples = new object[] + { + "" + }, + isA = new object[] + { + null + }, + preferredTerms = new object[] + { + null + }, + preferredToTerms = new object[] + { + null + }, + replacedBy = new object[] + { + null + }, + replacementTerms = new object[] + { + null + }, + seeAlso = new object[] + { + null + }, + synonyms = new object[] + { + null + }, + translatedTerms = new object[] + { + null + }, + translationTerms = new object[] + { + null + }, + usage = "", + validValues = new object[] + { + null + }, + validValuesFor = new object[] + { + null + }, +}); +Response response = await client.UpdateTermAsync("", content, includeTermHierarchy: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call UpdateTerm and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateTerm("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateTerm with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { + new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + name = "", + displayText = "", + itemPath = "", + resourceId = "", + properties = new + { + key = new object(), + }, + } + }, + resources = new object[] + { + new + { + displayName = "", + url = "", + } + }, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } + }, + categories = new object[] + { + new + { + categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + description = "", + displayText = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DRAFT", + } + }, + classifies = new object[] + { + null + }, + examples = new object[] + { + "" + }, + isA = new object[] + { + null + }, + preferredTerms = new object[] + { + null + }, + preferredToTerms = new object[] + { + null + }, + replacedBy = new object[] + { + null + }, + replacementTerms = new object[] + { + null + }, + seeAlso = new object[] + { + null + }, + synonyms = new object[] + { + null + }, + translatedTerms = new object[] + { + null + }, + translationTerms = new object[] + { + null + }, + usage = "", + validValues = new object[] + { + null + }, + validValuesFor = new object[] + { + null + }, +}); +Response response = client.UpdateTerm("", content, includeTermHierarchy: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call DeleteTermAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.DeleteTermAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTermAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.DeleteTermAsync(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTerm. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.DeleteTerm(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTerm with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.DeleteTerm(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call PartialUpdateTermAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.PartialUpdateTermAsync("", new Dictionary +{ + ["key"] = "" +}); +]]> +This sample shows how to call PartialUpdateTermAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = await client.PartialUpdateTermAsync("", new Dictionary +{ + ["key"] = "" +}, includeTermHierarchy: true); +]]> + + + +This sample shows how to call PartialUpdateTerm. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.PartialUpdateTerm("", new Dictionary +{ + ["key"] = "" +}); +]]> +This sample shows how to call PartialUpdateTerm with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = client.PartialUpdateTerm("", new Dictionary +{ + ["key"] = "" +}, includeTermHierarchy: true); +]]> + + + +This sample shows how to call PartialUpdateTermAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = await client.PartialUpdateTermAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdateTermAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = await client.PartialUpdateTermAsync("", content, includeTermHierarchy: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call PartialUpdateTerm and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = client.PartialUpdateTerm("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdateTerm with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = client.PartialUpdateTerm("", content, includeTermHierarchy: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call CreateTermsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.CreateTermsAsync(new AtlasGlossaryTerm[] +{ + new AtlasGlossaryTerm() +}); +]]> +This sample shows how to call CreateTermsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response> response = await client.CreateTermsAsync(new AtlasGlossaryTerm[] +{ + new AtlasGlossaryTerm + { + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = {BinaryData.FromObjectAsJson(new object())}, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Name = "", + DisplayText = "", + ItemPath = "", + ResourceId = "", + Properties = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }}, + Resources = {new ResourceLink + { + DisplayName = "", + Url = "", + }}, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + Attributes = + { + ["key"] = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, + AssignedEntities = {new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + }}, + Categories = {new AtlasTermCategorizationHeader + { + CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Description = "", + DisplayText = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermRelationshipStatus.Draft, + }}, + Classifies = {default}, + Examples = {""}, + IsA = {default}, + PreferredTerms = {default}, + PreferredToTerms = {default}, + ReplacedBy = {default}, + ReplacementTerms = {default}, + SeeAlso = {default}, + Synonyms = {default}, + TranslatedTerms = {default}, + TranslationTerms = {default}, + Usage = "", + ValidValues = {default}, + ValidValuesFor = {default}, + } +}, includeTermHierarchy: true); +]]> + + + +This sample shows how to call CreateTerms. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.CreateTerms(new AtlasGlossaryTerm[] +{ + new AtlasGlossaryTerm() +}); +]]> +This sample shows how to call CreateTerms with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response> response = client.CreateTerms(new AtlasGlossaryTerm[] +{ + new AtlasGlossaryTerm + { + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = {BinaryData.FromObjectAsJson(new object())}, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Name = "", + DisplayText = "", + ItemPath = "", + ResourceId = "", + Properties = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }}, + Resources = {new ResourceLink + { + DisplayName = "", + Url = "", + }}, + Contacts = + { + ["key"] = {new ContactInfo + { + Id = "", + Info = "", + }} + }, + Attributes = + { + ["key"] = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, + AssignedEntities = {new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + }}, + Categories = {new AtlasTermCategorizationHeader + { + CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Description = "", + DisplayText = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermRelationshipStatus.Draft, + }}, + Classifies = {default}, + Examples = {""}, + IsA = {default}, + PreferredTerms = {default}, + PreferredToTerms = {default}, + ReplacedBy = {default}, + ReplacementTerms = {default}, + SeeAlso = {default}, + Synonyms = {default}, + TranslatedTerms = {default}, + TranslationTerms = {default}, + Usage = "", + ValidValues = {default}, + ValidValuesFor = {default}, + } +}, includeTermHierarchy: true); +]]> + + + +This sample shows how to call CreateTermsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = await client.CreateTermsAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call CreateTermsAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { + new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + name = "", + displayText = "", + itemPath = "", + resourceId = "", + properties = new + { + key = new object(), + }, + } + }, + resources = new object[] + { + new + { + displayName = "", + url = "", + } + }, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } + }, + categories = new object[] + { + new + { + categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + description = "", + displayText = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DRAFT", + } + }, + classifies = new object[] + { + null + }, + examples = new object[] + { + "" + }, + isA = new object[] + { + null + }, + preferredTerms = new object[] + { + null + }, + preferredToTerms = new object[] + { + null + }, + replacedBy = new object[] + { + null + }, + replacementTerms = new object[] + { + null + }, + seeAlso = new object[] + { + null + }, + synonyms = new object[] + { + null + }, + translatedTerms = new object[] + { + null + }, + translationTerms = new object[] + { + null + }, + usage = "", + validValues = new object[] + { + null + }, + validValuesFor = new object[] + { + null + }, + } +}); +Response response = await client.CreateTermsAsync(content, includeTermHierarchy: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); +Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("nickName").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("usage").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call CreateTerms and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = client.CreateTerms(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call CreateTerms with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { + new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + name = "", + displayText = "", + itemPath = "", + resourceId = "", + properties = new + { + key = new object(), + }, + } + }, + resources = new object[] + { + new + { + displayName = "", + url = "", + } + }, + contacts = new + { + key = new object[] + { + new + { + id = "", + info = "", + } + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } + }, + categories = new object[] + { + new + { + categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + description = "", + displayText = "", + relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + status = "DRAFT", + } + }, + classifies = new object[] + { + null + }, + examples = new object[] + { + "" + }, + isA = new object[] + { + null + }, + preferredTerms = new object[] + { + null + }, + preferredToTerms = new object[] + { + null + }, + replacedBy = new object[] + { + null + }, + replacementTerms = new object[] + { + null + }, + seeAlso = new object[] + { + null + }, + synonyms = new object[] + { + null + }, + translatedTerms = new object[] + { + null + }, + translationTerms = new object[] + { + null + }, + usage = "", + validValues = new object[] + { + null + }, + validValuesFor = new object[] + { + null + }, + } +}); +Response response = client.CreateTerms(content, includeTermHierarchy: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); +Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("nickName").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("usage").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetEntitiesAssignedWithTermAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetEntitiesAssignedWithTermAsync(""); +]]> +This sample shows how to call GetEntitiesAssignedWithTermAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetEntitiesAssignedWithTermAsync("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetEntitiesAssignedWithTerm. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetEntitiesAssignedWithTerm(""); +]]> +This sample shows how to call GetEntitiesAssignedWithTerm with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetEntitiesAssignedWithTerm("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetEntitiesAssignedWithTermAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetEntitiesAssignedWithTermAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetEntitiesAssignedWithTermAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetEntitiesAssignedWithTermAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); +]]> + + + +This sample shows how to call GetEntitiesAssignedWithTerm and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetEntitiesAssignedWithTerm("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetEntitiesAssignedWithTerm with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetEntitiesAssignedWithTerm("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); +]]> + + + +This sample shows how to call AssignTermToEntitiesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.AssignTermToEntitiesAsync("", new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId() +}); +]]> +This sample shows how to call AssignTermToEntitiesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.AssignTermToEntitiesAsync("", new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + } +}); +]]> + + + +This sample shows how to call AssignTermToEntities. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.AssignTermToEntities("", new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId() +}); +]]> +This sample shows how to call AssignTermToEntities with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.AssignTermToEntities("", new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + } +}); +]]> + + + +This sample shows how to call AssignTermToEntitiesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = await client.AssignTermToEntitiesAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AssignTermToEntitiesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } +}); +Response response = await client.AssignTermToEntitiesAsync("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AssignTermToEntities. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = client.AssignTermToEntities("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AssignTermToEntities with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } +}); +Response response = client.AssignTermToEntities("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTermAssignmentFromEntitiesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId() +}); +]]> +This sample shows how to call DeleteTermAssignmentFromEntitiesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + } +}); +]]> + + + +This sample shows how to call DeleteTermAssignmentFromEntities. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.DeleteTermAssignmentFromEntities("", new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId() +}); +]]> +This sample shows how to call DeleteTermAssignmentFromEntities with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.DeleteTermAssignmentFromEntities("", new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + DisplayText = "", + EntityStatus = EntityStatus.Active, + RelationshipType = "", + RelationshipAttributes = new AtlasStruct + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + }, + RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + RelationshipStatus = StatusAtlasRelationship.Active, + } +}); +]]> + + + +This sample shows how to call DeleteTermAssignmentFromEntitiesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTermAssignmentFromEntitiesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } +}); +Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTermAssignmentFromEntities. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new object() +}); +Response response = client.DeleteTermAssignmentFromEntities("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTermAssignmentFromEntities with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object[] +{ + new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + displayText = "", + entityStatus = "ACTIVE", + relationshipType = "", + relationshipAttributes = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + }, + relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + relationshipStatus = "ACTIVE", + } +}); +Response response = client.DeleteTermAssignmentFromEntities("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetRelatedTermsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response>> response = await client.GetRelatedTermsAsync(""); +]]> +This sample shows how to call GetRelatedTermsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response>> response = await client.GetRelatedTermsAsync("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetRelatedTerms. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response>> response = client.GetRelatedTerms(""); +]]> +This sample shows how to call GetRelatedTerms with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response>> response = client.GetRelatedTerms("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetRelatedTermsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetRelatedTermsAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].ToString()); +]]> +This sample shows how to call GetRelatedTermsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = await client.GetRelatedTermsAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetRelatedTerms and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetRelatedTerms("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].ToString()); +]]> +This sample shows how to call GetRelatedTerms with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = client.GetRelatedTerms("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetGlossaryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetGlossaryAsync(""); +]]> +This sample shows how to call GetGlossaryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetGlossaryAsync(""); +]]> + + + +This sample shows how to call GetGlossary. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetGlossary(""); +]]> +This sample shows how to call GetGlossary with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetGlossary(""); +]]> + + + +This sample shows how to call GetGlossaryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetGlossaryAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetGlossaryAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetGlossaryAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call GetGlossary and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetGlossary("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetGlossary with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetGlossary("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call UpdateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossary atlasGlossary = new AtlasGlossary(); +Response response = await client.UpdateAsync("", atlasGlossary); +]]> +This sample shows how to call UpdateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +AtlasGlossary atlasGlossary = new AtlasGlossary +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Categories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + Language = "", + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Usage = "", +}; +Response response = await client.UpdateAsync("", atlasGlossary, ignoreTermsAndCategories: true); +]]> + + + +This sample shows how to call Update. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +AtlasGlossary atlasGlossary = new AtlasGlossary(); +Response response = client.Update("", atlasGlossary); +]]> +This sample shows how to call Update with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +AtlasGlossary atlasGlossary = new AtlasGlossary +{ + Guid = "", + Classifications = {new AtlasClassification + { + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, + }}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Categories = {new AtlasRelatedCategoryHeader + { + CategoryGuid = "", + Description = "", + DisplayText = "", + ParentCategoryGuid = "", + RelationGuid = "", + }}, + Language = "", + Terms = {new AtlasRelatedTermHeader + { + Description = "", + DisplayText = "", + Expression = "", + RelationGuid = "", + Status = AtlasTermRelationshipStatus.Draft, + Steward = "", + TermGuid = "", + }}, + Usage = "", +}; +Response response = client.Update("", atlasGlossary, ignoreTermsAndCategories: true); +]]> + + + +This sample shows how to call UpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + categories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + language = "", + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + usage = "", +}); +Response response = await client.UpdateAsync("", content, ignoreTermsAndCategories: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call Update and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.Update("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Update with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + guid = "", + classifications = new object[] + { + new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { + new + { + endTime = "", + startTime = "", + timeZone = "", + } + }, + } + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + categories = new object[] + { + new + { + categoryGuid = "", + description = "", + displayText = "", + parentCategoryGuid = "", + relationGuid = "", + } + }, + language = "", + terms = new object[] + { + new + { + description = "", + displayText = "", + expression = "", + relationGuid = "", + status = "DRAFT", + steward = "", + termGuid = "", + } + }, + usage = "", +}); +Response response = client.Update("", content, ignoreTermsAndCategories: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call DeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.DeleteAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.DeleteAsync(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Delete. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.Delete(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call Delete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.Delete(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetCategoriesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetCategoriesAsync(""); +]]> +This sample shows how to call GetCategoriesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetCategoriesAsync("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetCategories. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetCategories(""); +]]> +This sample shows how to call GetCategories with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetCategories("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetCategoriesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoriesAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetCategoriesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoriesAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetCategories and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategories("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetCategories with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategories("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetCategoriesHeadersAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetCategoriesHeadersAsync(""); +]]> +This sample shows how to call GetCategoriesHeadersAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetCategoriesHeadersAsync("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetCategoriesHeaders. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetCategoriesHeaders(""); +]]> +This sample shows how to call GetCategoriesHeaders with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetCategoriesHeaders("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetCategoriesHeadersAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoriesHeadersAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetCategoriesHeadersAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetCategoriesHeadersAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); +]]> + + + +This sample shows how to call GetCategoriesHeaders and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategoriesHeaders("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetCategoriesHeaders with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetCategoriesHeaders("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); +]]> + + + +This sample shows how to call GetDetailedAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetDetailedAsync(""); +]]> +This sample shows how to call GetDetailedAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = await client.GetDetailedAsync(""); +]]> + + + +This sample shows how to call GetDetailed. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetDetailed(""); +]]> +This sample shows how to call GetDetailed with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = client.GetDetailed(""); +]]> + + + +This sample shows how to call GetDetailedAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetDetailedAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetDetailedAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = await client.GetDetailedAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetDetailed and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetDetailed("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetDetailed with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = client.GetDetailed("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("nickName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call PartialUpdateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.PartialUpdateAsync("", new Dictionary +{ + ["key"] = "" +}); +]]> +This sample shows how to call PartialUpdateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = await client.PartialUpdateAsync("", new Dictionary +{ + ["key"] = "" +}, ignoreTermsAndCategories: true); +]]> + + + +This sample shows how to call PartialUpdate. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.PartialUpdate("", new Dictionary +{ + ["key"] = "" +}); +]]> +This sample shows how to call PartialUpdate with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = client.PartialUpdate("", new Dictionary +{ + ["key"] = "" +}, ignoreTermsAndCategories: true); +]]> + + + +This sample shows how to call PartialUpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = await client.PartialUpdateAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdateAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = await client.PartialUpdateAsync("", content, ignoreTermsAndCategories: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call PartialUpdate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = client.PartialUpdate("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call PartialUpdate with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +using RequestContent content = RequestContent.Create(new +{ + key = "", +}); +Response response = client.PartialUpdate("", content, ignoreTermsAndCategories: true); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("longDescription").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("qualifiedName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("usage").ToString()); +]]> + + + +This sample shows how to call GetTermsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetTermsAsync(""); +]]> +This sample shows how to call GetTermsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response> response = await client.GetTermsAsync("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetTerms. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetTerms(""); +]]> +This sample shows how to call GetTerms with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response> response = client.GetTerms("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetTermsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetTermsAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetTermsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermsAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); +Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("nickName").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("usage").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetTerms and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetTerms("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetTerms with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + +Response response = client.GetTerms("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result[0].GetProperty("longDescription").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); +Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); +Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("createTime").ToString()); +Console.WriteLine(result[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); +Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("nickName").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); +Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); +Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); +Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("usage").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetTermHeadersAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetTermHeadersAsync(""); +]]> +This sample shows how to call GetTermHeadersAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = await client.GetTermHeadersAsync("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetTermHeaders. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetTermHeaders(""); +]]> +This sample shows how to call GetTermHeaders with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response> response = client.GetTermHeaders("", limit: 1234, offset: 1234, sort: ""); +]]> + + + +This sample shows how to call GetTermHeadersAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetTermHeadersAsync("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetTermHeadersAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = await client.GetTermHeadersAsync("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("termGuid").ToString()); +]]> + + + +This sample shows how to call GetTermHeaders and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetTermHeaders("", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetTermHeaders with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + +Response response = client.GetTermHeaders("", 1234, 1234, "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("displayText").ToString()); +Console.WriteLine(result[0].GetProperty("expression").ToString()); +Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result[0].GetProperty("status").ToString()); +Console.WriteLine(result[0].GetProperty("steward").ToString()); +Console.WriteLine(result[0].GetProperty("termGuid").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Lineage.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Lineage.xml new file mode 100644 index 0000000000000..dbd6dfdf204b6 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Lineage.xml @@ -0,0 +1,503 @@ + + + + + +This sample shows how to call GetLineageAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = await client.GetLineageAsync("", LineageDirection.Input); +]]> +This sample shows how to call GetLineageAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = await client.GetLineageAsync("", LineageDirection.Input, depth: 1234); +]]> + + + +This sample shows how to call GetLineage. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = client.GetLineage("", LineageDirection.Input); +]]> +This sample shows how to call GetLineage with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = client.GetLineage("", LineageDirection.Input, depth: 1234); +]]> + + + +This sample shows how to call GetLineageAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = await client.GetLineageAsync("", "INPUT"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetLineageAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = await client.GetLineageAsync("", "INPUT", depth: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("lineageDepth").ToString()); +Console.WriteLine(result.GetProperty("lineageWidth").ToString()); +Console.WriteLine(result.GetProperty("childrenCount").ToString()); +Console.WriteLine(result.GetProperty("lineageDirection").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); +]]> + + + +This sample shows how to call GetLineage and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = client.GetLineage("", "INPUT"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetLineage with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = client.GetLineage("", "INPUT", depth: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("lineageDepth").ToString()); +Console.WriteLine(result.GetProperty("lineageWidth").ToString()); +Console.WriteLine(result.GetProperty("childrenCount").ToString()); +Console.WriteLine(result.GetProperty("lineageDirection").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); +]]> + + + +This sample shows how to call GetNextPageAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + +Response response = await client.GetNextPageAsync("", LineageDirection.Input); +]]> +This sample shows how to call GetNextPageAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + +Response response = await client.GetNextPageAsync("", LineageDirection.Input, offset: 1234, limit: 1234); +]]> + + + +This sample shows how to call GetNextPage. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + +Response response = client.GetNextPage("", LineageDirection.Input); +]]> +This sample shows how to call GetNextPage with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + +Response response = client.GetNextPage("", LineageDirection.Input, offset: 1234, limit: 1234); +]]> + + + +This sample shows how to call GetNextPageAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + +Response response = await client.GetNextPageAsync("", "INPUT"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetNextPageAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + +Response response = await client.GetNextPageAsync("", "INPUT", offset: 1234, limit: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("lineageDepth").ToString()); +Console.WriteLine(result.GetProperty("lineageWidth").ToString()); +Console.WriteLine(result.GetProperty("childrenCount").ToString()); +Console.WriteLine(result.GetProperty("lineageDirection").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); +]]> + + + +This sample shows how to call GetNextPage and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + +Response response = client.GetNextPage("", "INPUT"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetNextPage with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + +Response response = client.GetNextPage("", "INPUT", offset: 1234, limit: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("lineageDepth").ToString()); +Console.WriteLine(result.GetProperty("lineageWidth").ToString()); +Console.WriteLine(result.GetProperty("childrenCount").ToString()); +Console.WriteLine(result.GetProperty("lineageDirection").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); +]]> + + + +This sample shows how to call GetByUniqueAttributeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = await client.GetByUniqueAttributeAsync("", LineageDirection.Input); +]]> +This sample shows how to call GetByUniqueAttributeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = await client.GetByUniqueAttributeAsync("", LineageDirection.Input, depth: 1234, attribute: ""); +]]> + + + +This sample shows how to call GetByUniqueAttribute. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = client.GetByUniqueAttribute("", LineageDirection.Input); +]]> +This sample shows how to call GetByUniqueAttribute with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = client.GetByUniqueAttribute("", LineageDirection.Input, depth: 1234, attribute: ""); +]]> + + + +This sample shows how to call GetByUniqueAttributeAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = await client.GetByUniqueAttributeAsync("", "INPUT"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByUniqueAttributeAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = await client.GetByUniqueAttributeAsync("", "INPUT", depth: 1234, attribute: ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("lineageDepth").ToString()); +Console.WriteLine(result.GetProperty("lineageWidth").ToString()); +Console.WriteLine(result.GetProperty("childrenCount").ToString()); +Console.WriteLine(result.GetProperty("lineageDirection").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); +]]> + + + +This sample shows how to call GetByUniqueAttribute and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = client.GetByUniqueAttribute("", "INPUT"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByUniqueAttribute with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + +Response response = client.GetByUniqueAttribute("", "INPUT", depth: 1234, attribute: ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("lineageDepth").ToString()); +Console.WriteLine(result.GetProperty("lineageWidth").ToString()); +Console.WriteLine(result.GetProperty("childrenCount").ToString()); +Console.WriteLine(result.GetProperty("lineageDirection").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); +Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml new file mode 100644 index 0000000000000..6a61cb95f88a9 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml @@ -0,0 +1,715 @@ + + + + + +This sample shows how to call CreateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +AtlasRelationship atlasRelationship = new AtlasRelationship(); +Response response = await client.CreateAsync(atlasRelationship); +]]> +This sample shows how to call CreateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +AtlasRelationship atlasRelationship = new AtlasRelationship +{ + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + End1 = new AtlasObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }, + End2 = default, + Guid = "", + HomeId = "", + Label = " + + + +This sample shows how to call Create. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +AtlasRelationship atlasRelationship = new AtlasRelationship(); +Response response = client.Create(atlasRelationship); +]]> +This sample shows how to call Create with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +AtlasRelationship atlasRelationship = new AtlasRelationship +{ + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + End1 = new AtlasObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }, + End2 = default, + Guid = "", + HomeId = "", + Label = " + + + +This sample shows how to call CreateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.CreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +using RequestContent content = RequestContent.Create(new +{ + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + end1 = new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + }, + guid = "", + homeId = "", + label = " + + + +This sample shows how to call Create and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.Create(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Create with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +using RequestContent content = RequestContent.Create(new +{ + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + end1 = new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + }, + guid = "", + homeId = "", + label = " + + + +This sample shows how to call UpdateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +AtlasRelationship atlasRelationship = new AtlasRelationship(); +Response response = await client.UpdateAsync(atlasRelationship); +]]> +This sample shows how to call UpdateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +AtlasRelationship atlasRelationship = new AtlasRelationship +{ + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + End1 = new AtlasObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }, + End2 = default, + Guid = "", + HomeId = "", + Label = " + + + +This sample shows how to call Update. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +AtlasRelationship atlasRelationship = new AtlasRelationship(); +Response response = client.Update(atlasRelationship); +]]> +This sample shows how to call Update with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +AtlasRelationship atlasRelationship = new AtlasRelationship +{ + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + End1 = new AtlasObjectId + { + Guid = "", + TypeName = "", + UniqueAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + }, + End2 = default, + Guid = "", + HomeId = "", + Label = " + + + +This sample shows how to call UpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call UpdateAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +using RequestContent content = RequestContent.Create(new +{ + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + end1 = new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + }, + guid = "", + homeId = "", + label = " + + + +This sample shows how to call Update and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.Update(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Update with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +using RequestContent content = RequestContent.Create(new +{ + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + end1 = new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + }, + guid = "", + homeId = "", + label = " + + + +This sample shows how to call GetRelationshipAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = await client.GetRelationshipAsync(""); +]]> +This sample shows how to call GetRelationshipAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = await client.GetRelationshipAsync("", extendedInfo: true); +]]> + + + +This sample shows how to call GetRelationship. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = client.GetRelationship(""); +]]> +This sample shows how to call GetRelationship with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = client.GetRelationship("", extendedInfo: true); +]]> + + + +This sample shows how to call GetRelationshipAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = await client.GetRelationshipAsync("", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationshipAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = await client.GetRelationshipAsync("", true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("version").ToString()); +]]> + + + +This sample shows how to call GetRelationship and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = client.GetRelationship("", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationship with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = client.GetRelationship("", true, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classificationNames")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meaningNames")[0].ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); +Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("attributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end1").GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("end2").GetProperty("uniqueAttributes").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("homeId").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("provenanceType").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("relationship").GetProperty("version").ToString()); +]]> + + + +This sample shows how to call DeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = await client.DeleteAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = await client.DeleteAsync(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Delete. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = client.Delete(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call Delete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + +Response response = client.Delete(""); + +Console.WriteLine(response.Status); +]]> + + + \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml new file mode 100644 index 0000000000000..fb412241d3107 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml @@ -0,0 +1,8929 @@ + + + + + +This sample shows how to call GetBusinessMetadataByIdAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetBusinessMetadataByIdAsync(""); +]]> +This sample shows how to call GetBusinessMetadataByIdAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetBusinessMetadataByIdAsync(""); +]]> + + + +This sample shows how to call GetBusinessMetadataById. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetBusinessMetadataById(""); +]]> +This sample shows how to call GetBusinessMetadataById with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetBusinessMetadataById(""); +]]> + + + +This sample shows how to call GetBusinessMetadataByIdAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetBusinessMetadataByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataByIdAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetBusinessMetadataByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetBusinessMetadataById and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetBusinessMetadataById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataById with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetBusinessMetadataById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetBusinessMetadataByNameAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetBusinessMetadataByNameAsync(""); +]]> +This sample shows how to call GetBusinessMetadataByNameAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetBusinessMetadataByNameAsync(""); +]]> + + + +This sample shows how to call GetBusinessMetadataByName. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetBusinessMetadataByName(""); +]]> +This sample shows how to call GetBusinessMetadataByName with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetBusinessMetadataByName(""); +]]> + + + +This sample shows how to call GetBusinessMetadataByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetBusinessMetadataByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetBusinessMetadataByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetBusinessMetadataByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetBusinessMetadataByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetBusinessMetadataByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetBusinessMetadataByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetClassificationByIdAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetClassificationByIdAsync(""); +]]> +This sample shows how to call GetClassificationByIdAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetClassificationByIdAsync(""); +]]> + + + +This sample shows how to call GetClassificationById. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetClassificationById(""); +]]> +This sample shows how to call GetClassificationById with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetClassificationById(""); +]]> + + + +This sample shows how to call GetClassificationByIdAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetClassificationByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationByIdAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetClassificationByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +]]> + + + +This sample shows how to call GetClassificationById and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetClassificationById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationById with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetClassificationById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +]]> + + + +This sample shows how to call GetClassificationByNameAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetClassificationByNameAsync(""); +]]> +This sample shows how to call GetClassificationByNameAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetClassificationByNameAsync(""); +]]> + + + +This sample shows how to call GetClassificationByName. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetClassificationByName(""); +]]> +This sample shows how to call GetClassificationByName with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetClassificationByName(""); +]]> + + + +This sample shows how to call GetClassificationByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetClassificationByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetClassificationByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +]]> + + + +This sample shows how to call GetClassificationByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetClassificationByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetClassificationByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetClassificationByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +]]> + + + +This sample shows how to call GetEntityByIdAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEntityByIdAsync(""); +]]> +This sample shows how to call GetEntityByIdAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEntityByIdAsync(""); +]]> + + + +This sample shows how to call GetEntityById. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEntityById(""); +]]> +This sample shows how to call GetEntityById with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEntityById(""); +]]> + + + +This sample shows how to call GetEntityByIdAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEntityByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntityByIdAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEntityByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +]]> + + + +This sample shows how to call GetEntityById and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEntityById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntityById with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEntityById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +]]> + + + +This sample shows how to call GetEntityByNameAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEntityByNameAsync(""); +]]> +This sample shows how to call GetEntityByNameAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEntityByNameAsync(""); +]]> + + + +This sample shows how to call GetEntityByName. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEntityByName(""); +]]> +This sample shows how to call GetEntityByName with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEntityByName(""); +]]> + + + +This sample shows how to call GetEntityByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEntityByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntityByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEntityByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +]]> + + + +This sample shows how to call GetEntityByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEntityByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEntityByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEntityByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +]]> + + + +This sample shows how to call GetEnumByIdAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEnumByIdAsync(""); +]]> +This sample shows how to call GetEnumByIdAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEnumByIdAsync(""); +]]> + + + +This sample shows how to call GetEnumById. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEnumById(""); +]]> +This sample shows how to call GetEnumById with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEnumById(""); +]]> + + + +This sample shows how to call GetEnumByIdAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEnumByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnumByIdAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEnumByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); +]]> + + + +This sample shows how to call GetEnumById and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEnumById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnumById with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEnumById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); +]]> + + + +This sample shows how to call GetEnumByNameAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEnumByNameAsync(""); +]]> +This sample shows how to call GetEnumByNameAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEnumByNameAsync(""); +]]> + + + +This sample shows how to call GetEnumByName. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEnumByName(""); +]]> +This sample shows how to call GetEnumByName with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEnumByName(""); +]]> + + + +This sample shows how to call GetEnumByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEnumByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnumByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetEnumByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); +]]> + + + +This sample shows how to call GetEnumByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEnumByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetEnumByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetEnumByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); +]]> + + + +This sample shows how to call GetRelationshipByIdAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetRelationshipByIdAsync(""); +]]> +This sample shows how to call GetRelationshipByIdAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetRelationshipByIdAsync(""); +]]> + + + +This sample shows how to call GetRelationshipById. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetRelationshipById(""); +]]> +This sample shows how to call GetRelationshipById with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetRelationshipById(""); +]]> + + + +This sample shows how to call GetRelationshipByIdAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetRelationshipByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationshipByIdAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetRelationshipByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); +]]> + + + +This sample shows how to call GetRelationshipById and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetRelationshipById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationshipById with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetRelationshipById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); +]]> + + + +This sample shows how to call GetRelationshipByNameAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetRelationshipByNameAsync(""); +]]> +This sample shows how to call GetRelationshipByNameAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetRelationshipByNameAsync(""); +]]> + + + +This sample shows how to call GetRelationshipByName. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetRelationshipByName(""); +]]> +This sample shows how to call GetRelationshipByName with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetRelationshipByName(""); +]]> + + + +This sample shows how to call GetRelationshipByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetRelationshipByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationshipByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetRelationshipByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); +]]> + + + +This sample shows how to call GetRelationshipByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetRelationshipByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetRelationshipByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetRelationshipByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); +]]> + + + +This sample shows how to call GetStructByIdAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetStructByIdAsync(""); +]]> +This sample shows how to call GetStructByIdAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetStructByIdAsync(""); +]]> + + + +This sample shows how to call GetStructById. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetStructById(""); +]]> +This sample shows how to call GetStructById with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetStructById(""); +]]> + + + +This sample shows how to call GetStructByIdAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetStructByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetStructByIdAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetStructByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetStructById and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetStructById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetStructById with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetStructById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetStructByNameAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetStructByNameAsync(""); +]]> +This sample shows how to call GetStructByNameAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetStructByNameAsync(""); +]]> + + + +This sample shows how to call GetStructByName. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetStructByName(""); +]]> +This sample shows how to call GetStructByName with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetStructByName(""); +]]> + + + +This sample shows how to call GetStructByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetStructByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetStructByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetStructByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetStructByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetStructByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetStructByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetStructByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetByIdAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetByIdAsync(""); +]]> +This sample shows how to call GetByIdAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetByIdAsync(""); +]]> + + + +This sample shows how to call GetById. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetById(""); +]]> +This sample shows how to call GetById with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetById(""); +]]> + + + +This sample shows how to call GetByIdAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByIdAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetById and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetById with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetByNameAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetByNameAsync(""); +]]> +This sample shows how to call GetByNameAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetByNameAsync(""); +]]> + + + +This sample shows how to call GetByName. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetByName(""); +]]> +This sample shows how to call GetByName with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetByName(""); +]]> + + + +This sample shows how to call GetByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call DeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.DeleteAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.DeleteAsync(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Delete. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.Delete(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call Delete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.Delete(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetTypeDefinitionAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetTypeDefinitionAsync(); +]]> +This sample shows how to call GetTypeDefinitionAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTypeDefinitionAsync(includeTermTemplate: true, type: TypeCategory.Primitive); +]]> + + + +This sample shows how to call GetTypeDefinition. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetTypeDefinition(); +]]> +This sample shows how to call GetTypeDefinition with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTypeDefinition(includeTermTemplate: true, type: TypeCategory.Primitive); +]]> + + + +This sample shows how to call GetTypeDefinitionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetTypeDefinitionAsync(null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTypeDefinitionAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTypeDefinitionAsync(true, "PRIMITIVE", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetTypeDefinition and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetTypeDefinition(null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTypeDefinition with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTypeDefinition(true, "PRIMITIVE", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call BatchCreateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); +Response response = await client.BatchCreateAsync(atlasTypesDef); +]]> +This sample shows how to call BatchCreateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef +{ + BusinessMetadataDefs = {new AtlasBusinessMetadataDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = new AtlasDateFormat + { + AvailableLocales = {""}, + Calendar = 123.45F, + DateInstance = default, + DateTimeInstance = default, + Instance = default, + Lenient = true, + NumberFormat = new AtlasNumberFormat + { + AvailableLocales = {""}, + Currency = "", + CurrencyInstance = default, + GroupingUsed = true, + Instance = default, + IntegerInstance = default, + MaximumFractionDigits = 1234, + MaximumIntegerDigits = 1234, + MinimumFractionDigits = 1234, + MinimumIntegerDigits = 1234, + NumberInstance = default, + ParseIntegerOnly = true, + PercentInstance = default, + RoundingMode = RoundingMode.Up, + }, + TimeInstance = default, + TimeZone = new AtlasTimeZone + { + DstSavings = 1234, + Id = "", + AvailableIds = {""}, + Default = default, + DisplayName = "", + RawOffset = 1234, + }, + }, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {new AtlasConstraintDef + { + Params = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Type = "", + }}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + }}, + }}, + ClassificationDefs = {new AtlasClassificationDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EntityTypes = {""}, + SubTypes = {""}, + SuperTypes = {""}, + }}, + EntityDefs = {new AtlasEntityDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + SubTypes = {""}, + SuperTypes = {""}, + RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {default}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + IsLegacyAttribute = true, + RelationshipTypeName = "", + }}, + }}, + EnumDefs = {new AtlasEnumDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + DefaultValue = "", + ElementDefs = {new AtlasEnumElementDef + { + Description = "", + Ordinal = 1234, + Value = "", + }}, + }}, + RelationshipDefs = {new AtlasRelationshipDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EndDef1 = new AtlasRelationshipEndDef + { + Cardinality = CardinalityValue.Single, + Description = "", + IsContainer = true, + IsLegacyAttribute = true, + Name = "", + Type = "", + }, + EndDef2 = default, + RelationshipCategory = RelationshipCategory.Association, + RelationshipLabel = "", + }}, + StructDefs = {new AtlasStructDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, + TermTemplateDefs = {new TermTemplateDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, +}; +Response response = await client.BatchCreateAsync(atlasTypesDef); +]]> + + + +This sample shows how to call BatchCreate. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); +Response response = client.BatchCreate(atlasTypesDef); +]]> +This sample shows how to call BatchCreate with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef +{ + BusinessMetadataDefs = {new AtlasBusinessMetadataDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = new AtlasDateFormat + { + AvailableLocales = {""}, + Calendar = 123.45F, + DateInstance = default, + DateTimeInstance = default, + Instance = default, + Lenient = true, + NumberFormat = new AtlasNumberFormat + { + AvailableLocales = {""}, + Currency = "", + CurrencyInstance = default, + GroupingUsed = true, + Instance = default, + IntegerInstance = default, + MaximumFractionDigits = 1234, + MaximumIntegerDigits = 1234, + MinimumFractionDigits = 1234, + MinimumIntegerDigits = 1234, + NumberInstance = default, + ParseIntegerOnly = true, + PercentInstance = default, + RoundingMode = RoundingMode.Up, + }, + TimeInstance = default, + TimeZone = new AtlasTimeZone + { + DstSavings = 1234, + Id = "", + AvailableIds = {""}, + Default = default, + DisplayName = "", + RawOffset = 1234, + }, + }, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {new AtlasConstraintDef + { + Params = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Type = "", + }}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + }}, + }}, + ClassificationDefs = {new AtlasClassificationDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EntityTypes = {""}, + SubTypes = {""}, + SuperTypes = {""}, + }}, + EntityDefs = {new AtlasEntityDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + SubTypes = {""}, + SuperTypes = {""}, + RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {default}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + IsLegacyAttribute = true, + RelationshipTypeName = "", + }}, + }}, + EnumDefs = {new AtlasEnumDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + DefaultValue = "", + ElementDefs = {new AtlasEnumElementDef + { + Description = "", + Ordinal = 1234, + Value = "", + }}, + }}, + RelationshipDefs = {new AtlasRelationshipDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EndDef1 = new AtlasRelationshipEndDef + { + Cardinality = CardinalityValue.Single, + Description = "", + IsContainer = true, + IsLegacyAttribute = true, + Name = "", + Type = "", + }, + EndDef2 = default, + RelationshipCategory = RelationshipCategory.Association, + RelationshipLabel = "", + }}, + StructDefs = {new AtlasStructDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, + TermTemplateDefs = {new TermTemplateDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, +}; +Response response = client.BatchCreate(atlasTypesDef); +]]> + + + +This sample shows how to call BatchCreateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.BatchCreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchCreateAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + businessMetadataDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + dateFormatter = new + { + availableLocales = new object[] + { + "" + }, + calendar = 123.45F, + lenient = true, + numberFormat = new + { + availableLocales = new object[] + { + "" + }, + currency = "", + groupingUsed = true, + maximumFractionDigits = 1234, + maximumIntegerDigits = 1234, + minimumFractionDigits = 1234, + minimumIntegerDigits = 1234, + parseIntegerOnly = true, + roundingMode = "UP", + }, + timeZone = new Dictionary + { + ["dstSavings"] = 1234, + ["id"] = "", + ["availableIds"] = new object[] + { + "" + }, + ["default"] = null, + ["displayName"] = "", + ["rawOffset"] = 1234 + }, + }, + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + new Dictionary + { + ["params"] = new + { + key = new object(), + }, + ["type"] = "" + } + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + } + }, + } + }, + classificationDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + entityTypes = new object[] + { + "" + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + } + }, + entityDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + relationshipAttributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + null + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + isLegacyAttribute = true, + relationshipTypeName = "", + } + }, + } + }, + enumDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + defaultValue = "", + elementDefs = new object[] + { + new + { + description = "", + ordinal = 1234, + value = "", + } + }, + } + }, + relationshipDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + endDef1 = new + { + cardinality = "SINGLE", + description = "", + isContainer = true, + isLegacyAttribute = true, + name = "", + type = "", + }, + relationshipCategory = "ASSOCIATION", + relationshipLabel = "", + } + }, + structDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, + termTemplateDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, +}); +Response response = await client.BatchCreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call BatchCreate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.BatchCreate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchCreate with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + businessMetadataDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + dateFormatter = new + { + availableLocales = new object[] + { + "" + }, + calendar = 123.45F, + lenient = true, + numberFormat = new + { + availableLocales = new object[] + { + "" + }, + currency = "", + groupingUsed = true, + maximumFractionDigits = 1234, + maximumIntegerDigits = 1234, + minimumFractionDigits = 1234, + minimumIntegerDigits = 1234, + parseIntegerOnly = true, + roundingMode = "UP", + }, + timeZone = new Dictionary + { + ["dstSavings"] = 1234, + ["id"] = "", + ["availableIds"] = new object[] + { + "" + }, + ["default"] = null, + ["displayName"] = "", + ["rawOffset"] = 1234 + }, + }, + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + new Dictionary + { + ["params"] = new + { + key = new object(), + }, + ["type"] = "" + } + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + } + }, + } + }, + classificationDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + entityTypes = new object[] + { + "" + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + } + }, + entityDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + relationshipAttributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + null + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + isLegacyAttribute = true, + relationshipTypeName = "", + } + }, + } + }, + enumDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + defaultValue = "", + elementDefs = new object[] + { + new + { + description = "", + ordinal = 1234, + value = "", + } + }, + } + }, + relationshipDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + endDef1 = new + { + cardinality = "SINGLE", + description = "", + isContainer = true, + isLegacyAttribute = true, + name = "", + type = "", + }, + relationshipCategory = "ASSOCIATION", + relationshipLabel = "", + } + }, + structDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, + termTemplateDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, +}); +Response response = client.BatchCreate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call BatchUpdateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); +Response response = await client.BatchUpdateAsync(atlasTypesDef); +]]> +This sample shows how to call BatchUpdateAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef +{ + BusinessMetadataDefs = {new AtlasBusinessMetadataDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = new AtlasDateFormat + { + AvailableLocales = {""}, + Calendar = 123.45F, + DateInstance = default, + DateTimeInstance = default, + Instance = default, + Lenient = true, + NumberFormat = new AtlasNumberFormat + { + AvailableLocales = {""}, + Currency = "", + CurrencyInstance = default, + GroupingUsed = true, + Instance = default, + IntegerInstance = default, + MaximumFractionDigits = 1234, + MaximumIntegerDigits = 1234, + MinimumFractionDigits = 1234, + MinimumIntegerDigits = 1234, + NumberInstance = default, + ParseIntegerOnly = true, + PercentInstance = default, + RoundingMode = RoundingMode.Up, + }, + TimeInstance = default, + TimeZone = new AtlasTimeZone + { + DstSavings = 1234, + Id = "", + AvailableIds = {""}, + Default = default, + DisplayName = "", + RawOffset = 1234, + }, + }, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {new AtlasConstraintDef + { + Params = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Type = "", + }}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + }}, + }}, + ClassificationDefs = {new AtlasClassificationDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EntityTypes = {""}, + SubTypes = {""}, + SuperTypes = {""}, + }}, + EntityDefs = {new AtlasEntityDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + SubTypes = {""}, + SuperTypes = {""}, + RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {default}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + IsLegacyAttribute = true, + RelationshipTypeName = "", + }}, + }}, + EnumDefs = {new AtlasEnumDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + DefaultValue = "", + ElementDefs = {new AtlasEnumElementDef + { + Description = "", + Ordinal = 1234, + Value = "", + }}, + }}, + RelationshipDefs = {new AtlasRelationshipDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EndDef1 = new AtlasRelationshipEndDef + { + Cardinality = CardinalityValue.Single, + Description = "", + IsContainer = true, + IsLegacyAttribute = true, + Name = "", + Type = "", + }, + EndDef2 = default, + RelationshipCategory = RelationshipCategory.Association, + RelationshipLabel = "", + }}, + StructDefs = {new AtlasStructDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, + TermTemplateDefs = {new TermTemplateDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, +}; +Response response = await client.BatchUpdateAsync(atlasTypesDef); +]]> + + + +This sample shows how to call BatchUpdate. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); +Response response = client.BatchUpdate(atlasTypesDef); +]]> +This sample shows how to call BatchUpdate with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef +{ + BusinessMetadataDefs = {new AtlasBusinessMetadataDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = new AtlasDateFormat + { + AvailableLocales = {""}, + Calendar = 123.45F, + DateInstance = default, + DateTimeInstance = default, + Instance = default, + Lenient = true, + NumberFormat = new AtlasNumberFormat + { + AvailableLocales = {""}, + Currency = "", + CurrencyInstance = default, + GroupingUsed = true, + Instance = default, + IntegerInstance = default, + MaximumFractionDigits = 1234, + MaximumIntegerDigits = 1234, + MinimumFractionDigits = 1234, + MinimumIntegerDigits = 1234, + NumberInstance = default, + ParseIntegerOnly = true, + PercentInstance = default, + RoundingMode = RoundingMode.Up, + }, + TimeInstance = default, + TimeZone = new AtlasTimeZone + { + DstSavings = 1234, + Id = "", + AvailableIds = {""}, + Default = default, + DisplayName = "", + RawOffset = 1234, + }, + }, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {new AtlasConstraintDef + { + Params = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Type = "", + }}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + }}, + }}, + ClassificationDefs = {new AtlasClassificationDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EntityTypes = {""}, + SubTypes = {""}, + SuperTypes = {""}, + }}, + EntityDefs = {new AtlasEntityDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + SubTypes = {""}, + SuperTypes = {""}, + RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {default}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + IsLegacyAttribute = true, + RelationshipTypeName = "", + }}, + }}, + EnumDefs = {new AtlasEnumDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + DefaultValue = "", + ElementDefs = {new AtlasEnumElementDef + { + Description = "", + Ordinal = 1234, + Value = "", + }}, + }}, + RelationshipDefs = {new AtlasRelationshipDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EndDef1 = new AtlasRelationshipEndDef + { + Cardinality = CardinalityValue.Single, + Description = "", + IsContainer = true, + IsLegacyAttribute = true, + Name = "", + Type = "", + }, + EndDef2 = default, + RelationshipCategory = RelationshipCategory.Association, + RelationshipLabel = "", + }}, + StructDefs = {new AtlasStructDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, + TermTemplateDefs = {new TermTemplateDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, +}; +Response response = client.BatchUpdate(atlasTypesDef); +]]> + + + +This sample shows how to call BatchUpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.BatchUpdateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchUpdateAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + businessMetadataDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + dateFormatter = new + { + availableLocales = new object[] + { + "" + }, + calendar = 123.45F, + lenient = true, + numberFormat = new + { + availableLocales = new object[] + { + "" + }, + currency = "", + groupingUsed = true, + maximumFractionDigits = 1234, + maximumIntegerDigits = 1234, + minimumFractionDigits = 1234, + minimumIntegerDigits = 1234, + parseIntegerOnly = true, + roundingMode = "UP", + }, + timeZone = new Dictionary + { + ["dstSavings"] = 1234, + ["id"] = "", + ["availableIds"] = new object[] + { + "" + }, + ["default"] = null, + ["displayName"] = "", + ["rawOffset"] = 1234 + }, + }, + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + new Dictionary + { + ["params"] = new + { + key = new object(), + }, + ["type"] = "" + } + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + } + }, + } + }, + classificationDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + entityTypes = new object[] + { + "" + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + } + }, + entityDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + relationshipAttributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + null + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + isLegacyAttribute = true, + relationshipTypeName = "", + } + }, + } + }, + enumDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + defaultValue = "", + elementDefs = new object[] + { + new + { + description = "", + ordinal = 1234, + value = "", + } + }, + } + }, + relationshipDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + endDef1 = new + { + cardinality = "SINGLE", + description = "", + isContainer = true, + isLegacyAttribute = true, + name = "", + type = "", + }, + relationshipCategory = "ASSOCIATION", + relationshipLabel = "", + } + }, + structDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, + termTemplateDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, +}); +Response response = await client.BatchUpdateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call BatchUpdate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.BatchUpdate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call BatchUpdate with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + businessMetadataDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + dateFormatter = new + { + availableLocales = new object[] + { + "" + }, + calendar = 123.45F, + lenient = true, + numberFormat = new + { + availableLocales = new object[] + { + "" + }, + currency = "", + groupingUsed = true, + maximumFractionDigits = 1234, + maximumIntegerDigits = 1234, + minimumFractionDigits = 1234, + minimumIntegerDigits = 1234, + parseIntegerOnly = true, + roundingMode = "UP", + }, + timeZone = new Dictionary + { + ["dstSavings"] = 1234, + ["id"] = "", + ["availableIds"] = new object[] + { + "" + }, + ["default"] = null, + ["displayName"] = "", + ["rawOffset"] = 1234 + }, + }, + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + new Dictionary + { + ["params"] = new + { + key = new object(), + }, + ["type"] = "" + } + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + } + }, + } + }, + classificationDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + entityTypes = new object[] + { + "" + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + } + }, + entityDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + relationshipAttributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + null + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + isLegacyAttribute = true, + relationshipTypeName = "", + } + }, + } + }, + enumDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + defaultValue = "", + elementDefs = new object[] + { + new + { + description = "", + ordinal = 1234, + value = "", + } + }, + } + }, + relationshipDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + endDef1 = new + { + cardinality = "SINGLE", + description = "", + isContainer = true, + isLegacyAttribute = true, + name = "", + type = "", + }, + relationshipCategory = "ASSOCIATION", + relationshipLabel = "", + } + }, + structDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, + termTemplateDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, +}); +Response response = client.BatchUpdate(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("businessMetadataDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("entityTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("classificationDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("subTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("superTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("entityDefs")[0].GetProperty("relationshipAttributeDefs")[0].GetProperty("relationshipTypeName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("ordinal").ToString()); +Console.WriteLine(result.GetProperty("enumDefs")[0].GetProperty("elementDefs")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef1").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isContainer").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("isLegacyAttribute").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("endDef2").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipCategory").ToString()); +Console.WriteLine(result.GetProperty("relationshipDefs")[0].GetProperty("relationshipLabel").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("structDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call BatchDeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); +Response response = await client.BatchDeleteAsync(atlasTypesDef); +]]> +This sample shows how to call BatchDeleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef +{ + BusinessMetadataDefs = {new AtlasBusinessMetadataDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = new AtlasDateFormat + { + AvailableLocales = {""}, + Calendar = 123.45F, + DateInstance = default, + DateTimeInstance = default, + Instance = default, + Lenient = true, + NumberFormat = new AtlasNumberFormat + { + AvailableLocales = {""}, + Currency = "", + CurrencyInstance = default, + GroupingUsed = true, + Instance = default, + IntegerInstance = default, + MaximumFractionDigits = 1234, + MaximumIntegerDigits = 1234, + MinimumFractionDigits = 1234, + MinimumIntegerDigits = 1234, + NumberInstance = default, + ParseIntegerOnly = true, + PercentInstance = default, + RoundingMode = RoundingMode.Up, + }, + TimeInstance = default, + TimeZone = new AtlasTimeZone + { + DstSavings = 1234, + Id = "", + AvailableIds = {""}, + Default = default, + DisplayName = "", + RawOffset = 1234, + }, + }, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {new AtlasConstraintDef + { + Params = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Type = "", + }}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + }}, + }}, + ClassificationDefs = {new AtlasClassificationDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EntityTypes = {""}, + SubTypes = {""}, + SuperTypes = {""}, + }}, + EntityDefs = {new AtlasEntityDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + SubTypes = {""}, + SuperTypes = {""}, + RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {default}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + IsLegacyAttribute = true, + RelationshipTypeName = "", + }}, + }}, + EnumDefs = {new AtlasEnumDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + DefaultValue = "", + ElementDefs = {new AtlasEnumElementDef + { + Description = "", + Ordinal = 1234, + Value = "", + }}, + }}, + RelationshipDefs = {new AtlasRelationshipDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EndDef1 = new AtlasRelationshipEndDef + { + Cardinality = CardinalityValue.Single, + Description = "", + IsContainer = true, + IsLegacyAttribute = true, + Name = "", + Type = "", + }, + EndDef2 = default, + RelationshipCategory = RelationshipCategory.Association, + RelationshipLabel = "", + }}, + StructDefs = {new AtlasStructDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, + TermTemplateDefs = {new TermTemplateDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, +}; +Response response = await client.BatchDeleteAsync(atlasTypesDef); +]]> + + + +This sample shows how to call BatchDelete. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); +Response response = client.BatchDelete(atlasTypesDef); +]]> +This sample shows how to call BatchDelete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +AtlasTypesDef atlasTypesDef = new AtlasTypesDef +{ + BusinessMetadataDefs = {new AtlasBusinessMetadataDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = new AtlasDateFormat + { + AvailableLocales = {""}, + Calendar = 123.45F, + DateInstance = default, + DateTimeInstance = default, + Instance = default, + Lenient = true, + NumberFormat = new AtlasNumberFormat + { + AvailableLocales = {""}, + Currency = "", + CurrencyInstance = default, + GroupingUsed = true, + Instance = default, + IntegerInstance = default, + MaximumFractionDigits = 1234, + MaximumIntegerDigits = 1234, + MinimumFractionDigits = 1234, + MinimumIntegerDigits = 1234, + NumberInstance = default, + ParseIntegerOnly = true, + PercentInstance = default, + RoundingMode = RoundingMode.Up, + }, + TimeInstance = default, + TimeZone = new AtlasTimeZone + { + DstSavings = 1234, + Id = "", + AvailableIds = {""}, + Default = default, + DisplayName = "", + RawOffset = 1234, + }, + }, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {new AtlasAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {new AtlasConstraintDef + { + Params = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Type = "", + }}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + }}, + }}, + ClassificationDefs = {new AtlasClassificationDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EntityTypes = {""}, + SubTypes = {""}, + SuperTypes = {""}, + }}, + EntityDefs = {new AtlasEntityDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + SubTypes = {""}, + SuperTypes = {""}, + RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef + { + Cardinality = CardinalityValue.Single, + Constraints = {default}, + DefaultValue = "", + Description = "", + IncludeInNotification = true, + IsIndexable = true, + IsOptional = true, + IsUnique = true, + Name = "", + Options = + { + ["key"] = "" + }, + TypeName = "", + ValuesMaxCount = 1234, + ValuesMinCount = 1234, + IsLegacyAttribute = true, + RelationshipTypeName = "", + }}, + }}, + EnumDefs = {new AtlasEnumDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + DefaultValue = "", + ElementDefs = {new AtlasEnumElementDef + { + Description = "", + Ordinal = 1234, + Value = "", + }}, + }}, + RelationshipDefs = {new AtlasRelationshipDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + EndDef1 = new AtlasRelationshipEndDef + { + Cardinality = CardinalityValue.Single, + Description = "", + IsContainer = true, + IsLegacyAttribute = true, + Name = "", + Type = "", + }, + EndDef2 = default, + RelationshipCategory = RelationshipCategory.Association, + RelationshipLabel = "", + }}, + StructDefs = {new AtlasStructDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, + TermTemplateDefs = {new TermTemplateDef + { + Category = TypeCategory.Primitive, + CreateTime = 1234L, + CreatedBy = "", + DateFormatter = default, + Description = "", + Guid = "", + Name = "", + Options = + { + ["key"] = "" + }, + ServiceType = "", + TypeVersion = "", + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + LastModifiedTS = "", + AttributeDefs = {default}, + }}, +}; +Response response = client.BatchDelete(atlasTypesDef); +]]> + + + +This sample shows how to call BatchDeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.BatchDeleteAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call BatchDeleteAsync with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + businessMetadataDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + dateFormatter = new + { + availableLocales = new object[] + { + "" + }, + calendar = 123.45F, + lenient = true, + numberFormat = new + { + availableLocales = new object[] + { + "" + }, + currency = "", + groupingUsed = true, + maximumFractionDigits = 1234, + maximumIntegerDigits = 1234, + minimumFractionDigits = 1234, + minimumIntegerDigits = 1234, + parseIntegerOnly = true, + roundingMode = "UP", + }, + timeZone = new Dictionary + { + ["dstSavings"] = 1234, + ["id"] = "", + ["availableIds"] = new object[] + { + "" + }, + ["default"] = null, + ["displayName"] = "", + ["rawOffset"] = 1234 + }, + }, + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + new Dictionary + { + ["params"] = new + { + key = new object(), + }, + ["type"] = "" + } + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + } + }, + } + }, + classificationDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + entityTypes = new object[] + { + "" + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + } + }, + entityDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + relationshipAttributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + null + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + isLegacyAttribute = true, + relationshipTypeName = "", + } + }, + } + }, + enumDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + defaultValue = "", + elementDefs = new object[] + { + new + { + description = "", + ordinal = 1234, + value = "", + } + }, + } + }, + relationshipDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + endDef1 = new + { + cardinality = "SINGLE", + description = "", + isContainer = true, + isLegacyAttribute = true, + name = "", + type = "", + }, + relationshipCategory = "ASSOCIATION", + relationshipLabel = "", + } + }, + structDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, + termTemplateDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, +}); +Response response = await client.BatchDeleteAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call BatchDelete. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.BatchDelete(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call BatchDelete with all request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +using RequestContent content = RequestContent.Create(new +{ + businessMetadataDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + dateFormatter = new + { + availableLocales = new object[] + { + "" + }, + calendar = 123.45F, + lenient = true, + numberFormat = new + { + availableLocales = new object[] + { + "" + }, + currency = "", + groupingUsed = true, + maximumFractionDigits = 1234, + maximumIntegerDigits = 1234, + minimumFractionDigits = 1234, + minimumIntegerDigits = 1234, + parseIntegerOnly = true, + roundingMode = "UP", + }, + timeZone = new Dictionary + { + ["dstSavings"] = 1234, + ["id"] = "", + ["availableIds"] = new object[] + { + "" + }, + ["default"] = null, + ["displayName"] = "", + ["rawOffset"] = 1234 + }, + }, + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + new Dictionary + { + ["params"] = new + { + key = new object(), + }, + ["type"] = "" + } + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + } + }, + } + }, + classificationDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + entityTypes = new object[] + { + "" + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + } + }, + entityDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + subTypes = new object[] + { + "" + }, + superTypes = new object[] + { + "" + }, + relationshipAttributeDefs = new object[] + { + new + { + cardinality = "SINGLE", + constraints = new object[] + { + null + }, + defaultValue = "", + description = "", + includeInNotification = true, + isIndexable = true, + isOptional = true, + isUnique = true, + name = "", + options = new + { + key = "", + }, + typeName = "", + valuesMaxCount = 1234, + valuesMinCount = 1234, + isLegacyAttribute = true, + relationshipTypeName = "", + } + }, + } + }, + enumDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + defaultValue = "", + elementDefs = new object[] + { + new + { + description = "", + ordinal = 1234, + value = "", + } + }, + } + }, + relationshipDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + endDef1 = new + { + cardinality = "SINGLE", + description = "", + isContainer = true, + isLegacyAttribute = true, + name = "", + type = "", + }, + relationshipCategory = "ASSOCIATION", + relationshipLabel = "", + } + }, + structDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, + termTemplateDefs = new object[] + { + new + { + category = "PRIMITIVE", + createTime = 1234L, + createdBy = "", + description = "", + guid = "", + name = "", + options = new + { + key = "", + }, + serviceType = "", + typeVersion = "", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + lastModifiedTS = "", + attributeDefs = new object[] + { + null + }, + } + }, +}); +Response response = client.BatchDelete(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetHeadersAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response> response = await client.GetHeadersAsync(); +]]> +This sample shows how to call GetHeadersAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response> response = await client.GetHeadersAsync(includeTermTemplate: true, type: TypeCategory.Primitive); +]]> + + + +This sample shows how to call GetHeaders. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response> response = client.GetHeaders(); +]]> +This sample shows how to call GetHeaders with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response> response = client.GetHeaders(includeTermTemplate: true, type: TypeCategory.Primitive); +]]> + + + +This sample shows how to call GetHeadersAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = await client.GetHeadersAsync(null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetHeadersAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetHeadersAsync(true, "PRIMITIVE", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("category").ToString()); +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +]]> + + + +This sample shows how to call GetHeaders and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); + +Response response = client.GetHeaders(null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].ToString()); +]]> +This sample shows how to call GetHeaders with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetHeaders(true, "PRIMITIVE", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("category").ToString()); +Console.WriteLine(result[0].GetProperty("guid").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +]]> + + + +This sample shows how to call GetTermTemplateByIdAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermTemplateByIdAsync(""); +]]> +This sample shows how to call GetTermTemplateByIdAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermTemplateByIdAsync(""); +]]> + + + +This sample shows how to call GetTermTemplateById. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTermTemplateById(""); +]]> +This sample shows how to call GetTermTemplateById with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTermTemplateById(""); +]]> + + + +This sample shows how to call GetTermTemplateByIdAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermTemplateByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTermTemplateByIdAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermTemplateByIdAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetTermTemplateById and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTermTemplateById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTermTemplateById with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTermTemplateById("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetTermTemplateByNameAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermTemplateByNameAsync(""); +]]> +This sample shows how to call GetTermTemplateByNameAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermTemplateByNameAsync(""); +]]> + + + +This sample shows how to call GetTermTemplateByName. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTermTemplateByName(""); +]]> +This sample shows how to call GetTermTemplateByName with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTermTemplateByName(""); +]]> + + + +This sample shows how to call GetTermTemplateByNameAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermTemplateByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTermTemplateByNameAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = await client.GetTermTemplateByNameAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + +This sample shows how to call GetTermTemplateByName and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTermTemplateByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTermTemplateByName with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01"); + +Response response = client.GetTermTemplateByName("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("createTime").ToString()); +Console.WriteLine(result.GetProperty("createdBy").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("calendar").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("lenient").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("availableLocales")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("currency").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("groupingUsed").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("maximumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumFractionDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("minimumIntegerDigits").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("parseIntegerOnly").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("numberFormat").GetProperty("roundingMode").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("dstSavings").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("availableIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("dateFormatter").GetProperty("timeZone").GetProperty("rawOffset").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("guid").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("serviceType").ToString()); +Console.WriteLine(result.GetProperty("typeVersion").ToString()); +Console.WriteLine(result.GetProperty("updateTime").ToString()); +Console.WriteLine(result.GetProperty("updatedBy").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("cardinality").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("params").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("constraints")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("includeInNotification").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isIndexable").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isOptional").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("isUnique").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("options").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("typeName").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMaxCount").ToString()); +Console.WriteLine(result.GetProperty("attributeDefs")[0].GetProperty("valuesMinCount").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs new file mode 100644 index 0000000000000..9248ec4203996 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs @@ -0,0 +1,5489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Purview.DataMap +{ + // Data plane generated sub-client. + /// The Entity sub-client. + public partial class Entity + { + private static readonly string[] AuthorizationScopes = new string[] { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of Entity for mocking. + protected Entity() + { + } + + /// Initializes a new instance of Entity. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// The to use. + /// The API version to use for this operation. + internal Entity(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// + /// Create or update an entity. + /// Existing entity is matched using its unique guid if + /// supplied or by its unique attributes eg: qualifiedName. + /// Map and array of + /// collections are not well supported. E.g., array<array<int>>, array<map<string, + /// int>>. + /// For each contact type, the maximum number of contacts is 20. + /// + /// + /// An instance of an entity along with extended info - like hive_table, + /// hive_database. + /// + /// + /// Used to define the update behavior for business attributes when updating + /// entities. + /// + /// + /// The collection where entities will be moved to. Only specify a value if you + /// need to move an entity to another collection. + /// + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> CreateOrUpdateAsync(AtlasEntityWithExtInfo atlasEntityWithExtInfo, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, string collectionId = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + Response response = await CreateOrUpdateAsync(content, businessAttributeUpdateBehavior?.ToString(), collectionId, context).ConfigureAwait(false); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// Create or update an entity. + /// Existing entity is matched using its unique guid if + /// supplied or by its unique attributes eg: qualifiedName. + /// Map and array of + /// collections are not well supported. E.g., array<array<int>>, array<map<string, + /// int>>. + /// For each contact type, the maximum number of contacts is 20. + /// + /// + /// An instance of an entity along with extended info - like hive_table, + /// hive_database. + /// + /// + /// Used to define the update behavior for business attributes when updating + /// entities. + /// + /// + /// The collection where entities will be moved to. Only specify a value if you + /// need to move an entity to another collection. + /// + /// The cancellation token to use. + /// is null. + /// + public virtual Response CreateOrUpdate(AtlasEntityWithExtInfo atlasEntityWithExtInfo, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, string collectionId = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + Response response = CreateOrUpdate(content, businessAttributeUpdateBehavior?.ToString(), collectionId, context); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Create or update an entity. + /// Existing entity is matched using its unique guid if + /// supplied or by its unique attributes eg: qualifiedName. + /// Map and array of + /// collections are not well supported. E.g., array<array<int>>, array<map<string, + /// int>>. + /// For each contact type, the maximum number of contacts is 20. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// + /// Used to define the update behavior for business attributes when updating + /// entities. Allowed values: "ignore" | "replace" | "merge" + /// + /// + /// The collection where entities will be moved to. Only specify a value if you + /// need to move an entity to another collection. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateOrUpdateAsync(RequestContent content, string businessAttributeUpdateBehavior = null, string collectionId = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.CreateOrUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateRequest(content, businessAttributeUpdateBehavior, collectionId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create or update an entity. + /// Existing entity is matched using its unique guid if + /// supplied or by its unique attributes eg: qualifiedName. + /// Map and array of + /// collections are not well supported. E.g., array<array<int>>, array<map<string, + /// int>>. + /// For each contact type, the maximum number of contacts is 20. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// + /// Used to define the update behavior for business attributes when updating + /// entities. Allowed values: "ignore" | "replace" | "merge" + /// + /// + /// The collection where entities will be moved to. Only specify a value if you + /// need to move an entity to another collection. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateOrUpdate(RequestContent content, string businessAttributeUpdateBehavior = null, string collectionId = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.CreateOrUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateRequest(content, businessAttributeUpdateBehavior, collectionId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List entities in bulk identified by its GUIDs. + /// An array of GUIDs of entities to list. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> GetByIdsAsync(IEnumerable guid, bool? minExtInfo = null, bool? ignoreRelationships = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetByIdsAsync(guid, minExtInfo, ignoreRelationships, context).ConfigureAwait(false); + return Response.FromValue(AtlasEntitiesWithExtInfo.FromResponse(response), response); + } + + /// List entities in bulk identified by its GUIDs. + /// An array of GUIDs of entities to list. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// The cancellation token to use. + /// is null. + /// + public virtual Response GetByIds(IEnumerable guid, bool? minExtInfo = null, bool? ignoreRelationships = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetByIds(guid, minExtInfo, ignoreRelationships, context); + return Response.FromValue(AtlasEntitiesWithExtInfo.FromResponse(response), response); + } + + /// + /// [Protocol Method] List entities in bulk identified by its GUIDs. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// An array of GUIDs of entities to list. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetByIdsAsync(IEnumerable guid, bool? minExtInfo, bool? ignoreRelationships, RequestContext context) + { + Argument.AssertNotNull(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetByIds"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByIdsRequest(guid, minExtInfo, ignoreRelationships, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] List entities in bulk identified by its GUIDs. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// An array of GUIDs of entities to list. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetByIds(IEnumerable guid, bool? minExtInfo, bool? ignoreRelationships, RequestContext context) + { + Argument.AssertNotNull(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetByIds"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByIdsRequest(guid, minExtInfo, ignoreRelationships, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update entities in bulk. + /// Existing entity is matched using its unique + /// guid if supplied or by its unique attributes eg: qualifiedName. + /// Map and array + /// of collections are not well supported. E.g., array<array<int>>, + /// array<map<string, int>>. + /// For each contact type, the maximum number of contacts + /// is 20. + /// + /// + /// An instance of an entity along with extended info - like hive_table, + /// hive_database. + /// + /// + /// The collection where entities will be moved to. Only specify a value if you + /// need to move an entity to another collection. + /// + /// + /// Used to define the update behavior for business attributes when updating + /// entities. + /// + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> BatchCreateOrUpdateAsync(AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasEntitiesWithExtInfo, nameof(atlasEntitiesWithExtInfo)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasEntitiesWithExtInfo.ToRequestContent(); + Response response = await BatchCreateOrUpdateAsync(content, collectionId, businessAttributeUpdateBehavior?.ToString(), context).ConfigureAwait(false); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// Create or update entities in bulk. + /// Existing entity is matched using its unique + /// guid if supplied or by its unique attributes eg: qualifiedName. + /// Map and array + /// of collections are not well supported. E.g., array<array<int>>, + /// array<map<string, int>>. + /// For each contact type, the maximum number of contacts + /// is 20. + /// + /// + /// An instance of an entity along with extended info - like hive_table, + /// hive_database. + /// + /// + /// The collection where entities will be moved to. Only specify a value if you + /// need to move an entity to another collection. + /// + /// + /// Used to define the update behavior for business attributes when updating + /// entities. + /// + /// The cancellation token to use. + /// is null. + /// + public virtual Response BatchCreateOrUpdate(AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasEntitiesWithExtInfo, nameof(atlasEntitiesWithExtInfo)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasEntitiesWithExtInfo.ToRequestContent(); + Response response = BatchCreateOrUpdate(content, collectionId, businessAttributeUpdateBehavior?.ToString(), context); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Create or update entities in bulk. + /// Existing entity is matched using its unique + /// guid if supplied or by its unique attributes eg: qualifiedName. + /// Map and array + /// of collections are not well supported. E.g., array<array<int>>, + /// array<map<string, int>>. + /// For each contact type, the maximum number of contacts + /// is 20. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// + /// The collection where entities will be moved to. Only specify a value if you + /// need to move an entity to another collection. + /// + /// + /// Used to define the update behavior for business attributes when updating + /// entities. Allowed values: "ignore" | "replace" | "merge" + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task BatchCreateOrUpdateAsync(RequestContent content, string collectionId = null, string businessAttributeUpdateBehavior = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.BatchCreateOrUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchCreateOrUpdateRequest(content, collectionId, businessAttributeUpdateBehavior, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create or update entities in bulk. + /// Existing entity is matched using its unique + /// guid if supplied or by its unique attributes eg: qualifiedName. + /// Map and array + /// of collections are not well supported. E.g., array<array<int>>, + /// array<map<string, int>>. + /// For each contact type, the maximum number of contacts + /// is 20. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// + /// The collection where entities will be moved to. Only specify a value if you + /// need to move an entity to another collection. + /// + /// + /// Used to define the update behavior for business attributes when updating + /// entities. Allowed values: "ignore" | "replace" | "merge" + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response BatchCreateOrUpdate(RequestContent content, string collectionId = null, string businessAttributeUpdateBehavior = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.BatchCreateOrUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchCreateOrUpdateRequest(content, collectionId, businessAttributeUpdateBehavior, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a list of entities in bulk identified by their GUIDs or unique + /// attributes. + /// + /// An array of GUIDs of entities to delete. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> BatchDeleteAsync(IEnumerable guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await BatchDeleteAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// Delete a list of entities in bulk identified by their GUIDs or unique + /// attributes. + /// + /// An array of GUIDs of entities to delete. + /// The cancellation token to use. + /// is null. + /// + public virtual Response BatchDelete(IEnumerable guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = BatchDelete(guid, context); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Delete a list of entities in bulk identified by their GUIDs or unique + /// attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// An array of GUIDs of entities to delete. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task BatchDeleteAsync(IEnumerable guid, RequestContext context) + { + Argument.AssertNotNull(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.BatchDelete"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchDeleteRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete a list of entities in bulk identified by their GUIDs or unique + /// attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// An array of GUIDs of entities to delete. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response BatchDelete(IEnumerable guid, RequestContext context) + { + Argument.AssertNotNull(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.BatchDelete"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchDeleteRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Associate a classification to multiple entities in bulk. + /// The request payload for classification association. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task AddClassificationAsync(ClassificationAssociateConfig classificationAssociateConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(classificationAssociateConfig, nameof(classificationAssociateConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = classificationAssociateConfig.ToRequestContent(); + Response response = await AddClassificationAsync(content, context).ConfigureAwait(false); + return response; + } + + /// Associate a classification to multiple entities in bulk. + /// The request payload for classification association. + /// The cancellation token to use. + /// is null. + /// + public virtual Response AddClassification(ClassificationAssociateConfig classificationAssociateConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(classificationAssociateConfig, nameof(classificationAssociateConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = classificationAssociateConfig.ToRequestContent(); + Response response = AddClassification(content, context); + return response; + } + + /// + /// [Protocol Method] Associate a classification to multiple entities in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddClassificationAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddClassification"); + scope.Start(); + try + { + using HttpMessage message = CreateAddClassificationRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Associate a classification to multiple entities in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddClassification(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddClassification"); + scope.Start(); + try + { + using HttpMessage message = CreateAddClassificationRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get complete definition of an entity given its GUID. + /// The globally unique identifier of the entity. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEntityAsync(string guid, bool? minExtInfo = null, bool? ignoreRelationships = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEntityAsync(guid, minExtInfo, ignoreRelationships, context).ConfigureAwait(false); + return Response.FromValue(AtlasEntityWithExtInfo.FromResponse(response), response); + } + + /// Get complete definition of an entity given its GUID. + /// The globally unique identifier of the entity. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEntity(string guid, bool? minExtInfo = null, bool? ignoreRelationships = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEntity(guid, minExtInfo, ignoreRelationships, context); + return Response.FromValue(AtlasEntityWithExtInfo.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get complete definition of an entity given its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetEntityAsync(string guid, bool? minExtInfo, bool? ignoreRelationships, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetEntity"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEntityRequest(guid, minExtInfo, ignoreRelationships, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get complete definition of an entity given its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetEntity(string guid, bool? minExtInfo, bool? ignoreRelationships, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetEntity"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEntityRequest(guid, minExtInfo, ignoreRelationships, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update entity partially - create or update entity attribute identified by its + /// GUID. + /// Supports only primitive attribute type and entity references. + /// It does not support updating complex types like arrays, and maps. + /// Null updates are not possible. + /// + /// The globally unique identifier of the entity. + /// The name of the attribute. + /// The value of the attribute. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> UpdateAttributeByIdAsync(string guid, string name, BinaryData body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromObject(body); + Response response = await UpdateAttributeByIdAsync(guid, name, content, context).ConfigureAwait(false); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// Update entity partially - create or update entity attribute identified by its + /// GUID. + /// Supports only primitive attribute type and entity references. + /// It does not support updating complex types like arrays, and maps. + /// Null updates are not possible. + /// + /// The globally unique identifier of the entity. + /// The name of the attribute. + /// The value of the attribute. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response UpdateAttributeById(string guid, string name, BinaryData body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromObject(body); + Response response = UpdateAttributeById(guid, name, content, context); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update entity partially - create or update entity attribute identified by its + /// GUID. + /// Supports only primitive attribute type and entity references. + /// It does not support updating complex types like arrays, and maps. + /// Null updates are not possible. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The name of the attribute. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateAttributeByIdAsync(string guid, string name, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.UpdateAttributeById"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateAttributeByIdRequest(guid, name, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update entity partially - create or update entity attribute identified by its + /// GUID. + /// Supports only primitive attribute type and entity references. + /// It does not support updating complex types like arrays, and maps. + /// Null updates are not possible. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The name of the attribute. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateAttributeById(string guid, string name, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.UpdateAttributeById"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateAttributeByIdRequest(guid, name, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete an entity identified by its GUID. + /// The globally unique identifier of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> DeleteAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await DeleteAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// Delete an entity identified by its GUID. + /// The globally unique identifier of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response Delete(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Delete(guid, context); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Delete an entity identified by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete an entity identified by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Delete(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get classification for a given entity represented by a GUID. + /// The globally unique identifier of the entity. + /// The name of the classification. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetClassificationAsync(string guid, string classificationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(classificationName, nameof(classificationName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetClassificationAsync(guid, classificationName, context).ConfigureAwait(false); + return Response.FromValue(AtlasClassification.FromResponse(response), response); + } + + /// Get classification for a given entity represented by a GUID. + /// The globally unique identifier of the entity. + /// The name of the classification. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetClassification(string guid, string classificationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(classificationName, nameof(classificationName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetClassification(guid, classificationName, context); + return Response.FromValue(AtlasClassification.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get classification for a given entity represented by a GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The name of the classification. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetClassificationAsync(string guid, string classificationName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(classificationName, nameof(classificationName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetClassification"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassificationRequest(guid, classificationName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get classification for a given entity represented by a GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The name of the classification. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetClassification(string guid, string classificationName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(classificationName, nameof(classificationName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetClassification"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassificationRequest(guid, classificationName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a given classification from an existing entity represented by a GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The name of the classification. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RemoveClassificationAsync(string guid, string classificationName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(classificationName, nameof(classificationName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveClassification"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveClassificationRequest(guid, classificationName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a given classification from an existing entity represented by a GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The name of the classification. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RemoveClassification(string guid, string classificationName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(classificationName, nameof(classificationName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveClassification"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveClassificationRequest(guid, classificationName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List classifications for a given entity represented by a GUID. + /// The globally unique identifier of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetClassificationsAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetClassificationsAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(AtlasClassifications.FromResponse(response), response); + } + + /// List classifications for a given entity represented by a GUID. + /// The globally unique identifier of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetClassifications(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetClassifications(guid, context); + return Response.FromValue(AtlasClassifications.FromResponse(response), response); + } + + /// + /// [Protocol Method] List classifications for a given entity represented by a GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetClassificationsAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetClassifications"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassificationsRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] List classifications for a given entity represented by a GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetClassifications(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetClassifications"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassificationsRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add classifications to an existing entity represented by a GUID. + /// The globally unique identifier of the entity. + /// An array of classifications to be added. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AddClassificationsAsync(string guid, IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await AddClassificationsAsync(guid, content, context).ConfigureAwait(false); + return response; + } + + /// Add classifications to an existing entity represented by a GUID. + /// The globally unique identifier of the entity. + /// An array of classifications to be added. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response AddClassifications(string guid, IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = AddClassifications(guid, content, context); + return response; + } + + /// + /// [Protocol Method] Add classifications to an existing entity represented by a GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddClassificationsAsync(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddClassifications"); + scope.Start(); + try + { + using HttpMessage message = CreateAddClassificationsRequest(guid, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add classifications to an existing entity represented by a GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddClassifications(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddClassifications"); + scope.Start(); + try + { + using HttpMessage message = CreateAddClassificationsRequest(guid, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update classifications to an existing entity represented by a guid. + /// The globally unique identifier of the entity. + /// An array of classifications to be updated. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task UpdateClassificationsAsync(string guid, IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await UpdateClassificationsAsync(guid, content, context).ConfigureAwait(false); + return response; + } + + /// Update classifications to an existing entity represented by a guid. + /// The globally unique identifier of the entity. + /// An array of classifications to be updated. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response UpdateClassifications(string guid, IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = UpdateClassifications(guid, content, context); + return response; + } + + /// + /// [Protocol Method] Update classifications to an existing entity represented by a guid. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateClassificationsAsync(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.UpdateClassifications"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateClassificationsRequest(guid, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update classifications to an existing entity represented by a guid. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateClassifications(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.UpdateClassifications"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateClassificationsRequest(guid, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get complete definition of an entity given its type and unique attribute. + /// + /// In + /// addition to the typeName path parameter, attribute key-value pair(s) can be + /// provided in the following format: + /// attr:\<attrName>=<attrValue>. + /// + /// NOTE: The + /// attrName and attrValue should be unique across entities, eg. + /// qualifiedName. + /// + /// The REST request would look something like this: + /// GET + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetByUniqueAttributeAsync(string typeName, bool? minExtInfo = null, bool? ignoreRelationships = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetByUniqueAttributeAsync(typeName, minExtInfo, ignoreRelationships, attribute, context).ConfigureAwait(false); + return Response.FromValue(AtlasEntityWithExtInfo.FromResponse(response), response); + } + + /// + /// Get complete definition of an entity given its type and unique attribute. + /// + /// In + /// addition to the typeName path parameter, attribute key-value pair(s) can be + /// provided in the following format: + /// attr:\<attrName>=<attrValue>. + /// + /// NOTE: The + /// attrName and attrValue should be unique across entities, eg. + /// qualifiedName. + /// + /// The REST request would look something like this: + /// GET + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetByUniqueAttribute(string typeName, bool? minExtInfo = null, bool? ignoreRelationships = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetByUniqueAttribute(typeName, minExtInfo, ignoreRelationships, attribute, context); + return Response.FromValue(AtlasEntityWithExtInfo.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get complete definition of an entity given its type and unique attribute. + /// + /// In + /// addition to the typeName path parameter, attribute key-value pair(s) can be + /// provided in the following format: + /// attr:\<attrName>=<attrValue>. + /// + /// NOTE: The + /// attrName and attrValue should be unique across entities, eg. + /// qualifiedName. + /// + /// The REST request would look something like this: + /// GET + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetByUniqueAttributeAsync(string typeName, bool? minExtInfo, bool? ignoreRelationships, string attribute, RequestContext context) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByUniqueAttributeRequest(typeName, minExtInfo, ignoreRelationships, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get complete definition of an entity given its type and unique attribute. + /// + /// In + /// addition to the typeName path parameter, attribute key-value pair(s) can be + /// provided in the following format: + /// attr:\<attrName>=<attrValue>. + /// + /// NOTE: The + /// attrName and attrValue should be unique across entities, eg. + /// qualifiedName. + /// + /// The REST request would look something like this: + /// GET + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetByUniqueAttribute(string typeName, bool? minExtInfo, bool? ignoreRelationships, string attribute, RequestContext context) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByUniqueAttributeRequest(typeName, minExtInfo, ignoreRelationships, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update entity partially - Allow a subset of attributes to be updated on an + /// entity which is identified by its type and unique attribute eg: + /// Referenceable.qualifiedName. Null updates are not possible. + /// + /// In addition to the + /// typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: + /// + /// attr:<attrName>=<attrValue>. + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: + /// PUT + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// + /// An instance of an entity along with extended info - like hive_table, + /// hive_database. + /// + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> UpdateByUniqueAttributeAsync(string typeName, AtlasEntityWithExtInfo atlasEntityWithExtInfo, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + Response response = await UpdateByUniqueAttributeAsync(typeName, content, attribute, context).ConfigureAwait(false); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// Update entity partially - Allow a subset of attributes to be updated on an + /// entity which is identified by its type and unique attribute eg: + /// Referenceable.qualifiedName. Null updates are not possible. + /// + /// In addition to the + /// typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: + /// + /// attr:<attrName>=<attrValue>. + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: + /// PUT + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// + /// An instance of an entity along with extended info - like hive_table, + /// hive_database. + /// + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response UpdateByUniqueAttribute(string typeName, AtlasEntityWithExtInfo atlasEntityWithExtInfo, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + Response response = UpdateByUniqueAttribute(typeName, content, attribute, context); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update entity partially - Allow a subset of attributes to be updated on an + /// entity which is identified by its type and unique attribute eg: + /// Referenceable.qualifiedName. Null updates are not possible. + /// + /// In addition to the + /// typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: + /// + /// attr:<attrName>=<attrValue>. + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: + /// PUT + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateByUniqueAttributeAsync(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.UpdateByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateByUniqueAttributeRequest(typeName, content, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update entity partially - Allow a subset of attributes to be updated on an + /// entity which is identified by its type and unique attribute eg: + /// Referenceable.qualifiedName. Null updates are not possible. + /// + /// In addition to the + /// typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: + /// + /// attr:<attrName>=<attrValue>. + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: + /// PUT + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateByUniqueAttribute(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.UpdateByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateByUniqueAttributeRequest(typeName, content, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete an entity identified by its type and unique attributes. + /// In addition to + /// the typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: + /// attr:\<attrName>=\<attrValue>. + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: + /// DELETE + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> DeleteByUniqueAttributeAsync(string typeName, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await DeleteByUniqueAttributeAsync(typeName, attribute, context).ConfigureAwait(false); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// Delete an entity identified by its type and unique attributes. + /// In addition to + /// the typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: + /// attr:\<attrName>=\<attrValue>. + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: + /// DELETE + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response DeleteByUniqueAttribute(string typeName, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = DeleteByUniqueAttribute(typeName, attribute, context); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Delete an entity identified by its type and unique attributes. + /// In addition to + /// the typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: + /// attr:\<attrName>=\<attrValue>. + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: + /// DELETE + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteByUniqueAttributeAsync(string typeName, string attribute, RequestContext context) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.DeleteByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteByUniqueAttributeRequest(typeName, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete an entity identified by its type and unique attributes. + /// In addition to + /// the typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: + /// attr:\<attrName>=\<attrValue>. + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: + /// DELETE + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteByUniqueAttribute(string typeName, string attribute, RequestContext context) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.DeleteByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteByUniqueAttributeRequest(typeName, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a given classification from an entity identified by its type and unique + /// attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the type. + /// The name of the classification. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RemoveClassificationByUniqueAttributeAsync(string typeName, string classificationName, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNullOrEmpty(classificationName, nameof(classificationName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveClassificationByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveClassificationByUniqueAttributeRequest(typeName, classificationName, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a given classification from an entity identified by its type and unique + /// attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the type. + /// The name of the classification. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RemoveClassificationByUniqueAttribute(string typeName, string classificationName, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNullOrEmpty(classificationName, nameof(classificationName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveClassificationByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveClassificationByUniqueAttributeRequest(typeName, classificationName, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add classification to the entity identified by its type and unique attributes. + /// The name of the type. + /// An array of classification to be added. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AddClassificationsByUniqueAttributeAsync(string typeName, IEnumerable body, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await AddClassificationsByUniqueAttributeAsync(typeName, content, attribute, context).ConfigureAwait(false); + return response; + } + + /// Add classification to the entity identified by its type and unique attributes. + /// The name of the type. + /// An array of classification to be added. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response AddClassificationsByUniqueAttribute(string typeName, IEnumerable body, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = AddClassificationsByUniqueAttribute(typeName, content, attribute, context); + return response; + } + + /// + /// [Protocol Method] Add classification to the entity identified by its type and unique attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddClassificationsByUniqueAttributeAsync(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddClassificationsByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateAddClassificationsByUniqueAttributeRequest(typeName, content, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add classification to the entity identified by its type and unique attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddClassificationsByUniqueAttribute(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddClassificationsByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateAddClassificationsByUniqueAttributeRequest(typeName, content, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update classification on an entity identified by its type and unique attributes. + /// The name of the type. + /// An array of classification to be updated. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task UpdateClassificationsUniqueByAttributeAsync(string typeName, IEnumerable body, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await UpdateClassificationsUniqueByAttributeAsync(typeName, content, attribute, context).ConfigureAwait(false); + return response; + } + + /// Update classification on an entity identified by its type and unique attributes. + /// The name of the type. + /// An array of classification to be updated. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response UpdateClassificationsUniqueByAttribute(string typeName, IEnumerable body, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = UpdateClassificationsUniqueByAttribute(typeName, content, attribute, context); + return response; + } + + /// + /// [Protocol Method] Update classification on an entity identified by its type and unique attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateClassificationsUniqueByAttributeAsync(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.UpdateClassificationsUniqueByAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateClassificationsUniqueByAttributeRequest(typeName, content, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update classification on an entity identified by its type and unique attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateClassificationsUniqueByAttribute(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.UpdateClassificationsUniqueByAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateClassificationsUniqueByAttributeRequest(typeName, content, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Set classifications on entities in bulk. + /// An instance of an entity header map. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task>> BatchSetClassificationsAsync(AtlasEntityHeaders atlasEntityHeaders, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasEntityHeaders, nameof(atlasEntityHeaders)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasEntityHeaders.ToRequestContent(); + Response response = await BatchSetClassificationsAsync(content, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(item.GetString()); + } + value = array; + return Response.FromValue(value, response); + } + + /// Set classifications on entities in bulk. + /// An instance of an entity header map. + /// The cancellation token to use. + /// is null. + /// + public virtual Response> BatchSetClassifications(AtlasEntityHeaders atlasEntityHeaders, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasEntityHeaders, nameof(atlasEntityHeaders)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasEntityHeaders.ToRequestContent(); + Response response = BatchSetClassifications(content, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(item.GetString()); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Set classifications on entities in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task BatchSetClassificationsAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.BatchSetClassifications"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchSetClassificationsRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Set classifications on entities in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response BatchSetClassifications(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.BatchSetClassifications"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchSetClassificationsRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Bulk API to retrieve list of entities identified by its unique attributes. + /// In + /// addition to the typeName path parameter, attribute key-value pair(s) can be + /// provided in the following + /// format + /// + /// typeName=\<typeName>&attr_1:\<attrName>=\<attrValue>&attr_2:\<attrName>=\<attrValue>&attr_3:\<attrName>=\<attrValue> + /// + /// NOTE: + /// The attrName should be an unique attribute for the given entity-type. + /// The REST + /// request would look something like this + /// + /// GET + /// /v2/entity/bulk/uniqueAttribute/type/hive_db?attr_1:qualifiedName=db1@cl1&attr_2:qualifiedName=db2@cl1 + /// + /// Note: + /// at least one unique attribute must be provided. + /// + /// The name of the type. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// + /// Qualified name of an entity. E.g. to find 2 entities you can set + /// attrs_1:qualifiedName=db1@cl1&attrs_2:qualifiedName=db2@cl1. (This is only an + /// example. qualifiedName can be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> BatchGetByUniqueAttributesAsync(string typeName, bool? minExtInfo = null, bool? ignoreRelationships = null, string attrNQualifiedName = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await BatchGetByUniqueAttributesAsync(typeName, minExtInfo, ignoreRelationships, attrNQualifiedName, context).ConfigureAwait(false); + return Response.FromValue(AtlasEntitiesWithExtInfo.FromResponse(response), response); + } + + /// + /// Bulk API to retrieve list of entities identified by its unique attributes. + /// In + /// addition to the typeName path parameter, attribute key-value pair(s) can be + /// provided in the following + /// format + /// + /// typeName=\<typeName>&attr_1:\<attrName>=\<attrValue>&attr_2:\<attrName>=\<attrValue>&attr_3:\<attrName>=\<attrValue> + /// + /// NOTE: + /// The attrName should be an unique attribute for the given entity-type. + /// The REST + /// request would look something like this + /// + /// GET + /// /v2/entity/bulk/uniqueAttribute/type/hive_db?attr_1:qualifiedName=db1@cl1&attr_2:qualifiedName=db2@cl1 + /// + /// Note: + /// at least one unique attribute must be provided. + /// + /// The name of the type. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// + /// Qualified name of an entity. E.g. to find 2 entities you can set + /// attrs_1:qualifiedName=db1@cl1&attrs_2:qualifiedName=db2@cl1. (This is only an + /// example. qualifiedName can be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response BatchGetByUniqueAttributes(string typeName, bool? minExtInfo = null, bool? ignoreRelationships = null, string attrNQualifiedName = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = BatchGetByUniqueAttributes(typeName, minExtInfo, ignoreRelationships, attrNQualifiedName, context); + return Response.FromValue(AtlasEntitiesWithExtInfo.FromResponse(response), response); + } + + /// + /// [Protocol Method] Bulk API to retrieve list of entities identified by its unique attributes. + /// In + /// addition to the typeName path parameter, attribute key-value pair(s) can be + /// provided in the following + /// format + /// + /// typeName=\<typeName>&attr_1:\<attrName>=\<attrValue>&attr_2:\<attrName>=\<attrValue>&attr_3:\<attrName>=\<attrValue> + /// + /// NOTE: + /// The attrName should be an unique attribute for the given entity-type. + /// The REST + /// request would look something like this + /// + /// GET + /// /v2/entity/bulk/uniqueAttribute/type/hive_db?attr_1:qualifiedName=db1@cl1&attr_2:qualifiedName=db2@cl1 + /// + /// Note: + /// at least one unique attribute must be provided. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// + /// Qualified name of an entity. E.g. to find 2 entities you can set + /// attrs_1:qualifiedName=db1@cl1&attrs_2:qualifiedName=db2@cl1. (This is only an + /// example. qualifiedName can be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task BatchGetByUniqueAttributesAsync(string typeName, bool? minExtInfo, bool? ignoreRelationships, string attrNQualifiedName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.BatchGetByUniqueAttributes"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchGetByUniqueAttributesRequest(typeName, minExtInfo, ignoreRelationships, attrNQualifiedName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Bulk API to retrieve list of entities identified by its unique attributes. + /// In + /// addition to the typeName path parameter, attribute key-value pair(s) can be + /// provided in the following + /// format + /// + /// typeName=\<typeName>&attr_1:\<attrName>=\<attrValue>&attr_2:\<attrName>=\<attrValue>&attr_3:\<attrName>=\<attrValue> + /// + /// NOTE: + /// The attrName should be an unique attribute for the given entity-type. + /// The REST + /// request would look something like this + /// + /// GET + /// /v2/entity/bulk/uniqueAttribute/type/hive_db?attr_1:qualifiedName=db1@cl1&attr_2:qualifiedName=db2@cl1 + /// + /// Note: + /// at least one unique attribute must be provided. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// Whether to return minimal information for referred entities. + /// Whether to ignore relationship attributes. + /// + /// Qualified name of an entity. E.g. to find 2 entities you can set + /// attrs_1:qualifiedName=db1@cl1&attrs_2:qualifiedName=db2@cl1. (This is only an + /// example. qualifiedName can be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response BatchGetByUniqueAttributes(string typeName, bool? minExtInfo, bool? ignoreRelationships, string attrNQualifiedName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.BatchGetByUniqueAttributes"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchGetByUniqueAttributesRequest(typeName, minExtInfo, ignoreRelationships, attrNQualifiedName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get entity header given its GUID. + /// The globally unique identifier of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetHeaderAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetHeaderAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(AtlasEntityHeader.FromResponse(response), response); + } + + /// Get entity header given its GUID. + /// The globally unique identifier of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetHeader(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetHeader(guid, context); + return Response.FromValue(AtlasEntityHeader.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get entity header given its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetHeaderAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetHeader"); + scope.Start(); + try + { + using HttpMessage message = CreateGetHeaderRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get entity header given its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetHeader(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.GetHeader"); + scope.Start(); + try + { + using HttpMessage message = CreateGetHeaderRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Remove business metadata from an entity. + /// The globally unique identifier of the entity. + /// Business metadata payload. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task RemoveBusinessMetadataAsync(string guid, IDictionary> body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = await RemoveBusinessMetadataAsync(guid, content, context).ConfigureAwait(false); + return response; + } + + /// Remove business metadata from an entity. + /// The globally unique identifier of the entity. + /// Business metadata payload. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response RemoveBusinessMetadata(string guid, IDictionary> body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = RemoveBusinessMetadata(guid, content, context); + return response; + } + + /// + /// [Protocol Method] Remove business metadata from an entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RemoveBusinessMetadataAsync(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveBusinessMetadata"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveBusinessMetadataRequest(guid, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Remove business metadata from an entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RemoveBusinessMetadata(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveBusinessMetadata"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveBusinessMetadataRequest(guid, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add business metadata to an entity. + /// The globally unique identifier of the entity. + /// BusinessMetadata payload. + /// + /// Whether to overwrite the existing business metadata on the entity or not, + /// default is false. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AddOrUpdateBusinessMetadataAsync(string guid, IDictionary> body, bool? overwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = await AddOrUpdateBusinessMetadataAsync(guid, content, overwrite, context).ConfigureAwait(false); + return response; + } + + /// Add business metadata to an entity. + /// The globally unique identifier of the entity. + /// BusinessMetadata payload. + /// + /// Whether to overwrite the existing business metadata on the entity or not, + /// default is false. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response AddOrUpdateBusinessMetadata(string guid, IDictionary> body, bool? overwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = AddOrUpdateBusinessMetadata(guid, content, overwrite, context); + return response; + } + + /// + /// [Protocol Method] Add business metadata to an entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// + /// Whether to overwrite the existing business metadata on the entity or not, + /// default is false. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddOrUpdateBusinessMetadataAsync(string guid, RequestContent content, bool? overwrite = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddOrUpdateBusinessMetadata"); + scope.Start(); + try + { + using HttpMessage message = CreateAddOrUpdateBusinessMetadataRequest(guid, content, overwrite, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add business metadata to an entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// + /// Whether to overwrite the existing business metadata on the entity or not, + /// default is false. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddOrUpdateBusinessMetadata(string guid, RequestContent content, bool? overwrite = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddOrUpdateBusinessMetadata"); + scope.Start(); + try + { + using HttpMessage message = CreateAddOrUpdateBusinessMetadataRequest(guid, content, overwrite, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete business metadata attributes from an entity. + /// The globally unique identifier of the entity. + /// BusinessMetadata name. + /// Business metadata attribute payload. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task RemoveBusinessMetadataAttributesAsync(string guid, string businessMetadataName, IDictionary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(businessMetadataName, nameof(businessMetadataName)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = await RemoveBusinessMetadataAttributesAsync(guid, businessMetadataName, content, context).ConfigureAwait(false); + return response; + } + + /// Delete business metadata attributes from an entity. + /// The globally unique identifier of the entity. + /// BusinessMetadata name. + /// Business metadata attribute payload. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response RemoveBusinessMetadataAttributes(string guid, string businessMetadataName, IDictionary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(businessMetadataName, nameof(businessMetadataName)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = RemoveBusinessMetadataAttributes(guid, businessMetadataName, content, context); + return response; + } + + /// + /// [Protocol Method] Delete business metadata attributes from an entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// BusinessMetadata name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RemoveBusinessMetadataAttributesAsync(string guid, string businessMetadataName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(businessMetadataName, nameof(businessMetadataName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveBusinessMetadataAttributes"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveBusinessMetadataAttributesRequest(guid, businessMetadataName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete business metadata attributes from an entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// BusinessMetadata name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RemoveBusinessMetadataAttributes(string guid, string businessMetadataName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(businessMetadataName, nameof(businessMetadataName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveBusinessMetadataAttributes"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveBusinessMetadataAttributesRequest(guid, businessMetadataName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add or update business metadata attributes. + /// The globally unique identifier of the entity. + /// BusinessMetadata name. + /// Business metadata attribute payload. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task AddOrUpdateBusinessMetadataAttributesAsync(string guid, string businessMetadataName, IDictionary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(businessMetadataName, nameof(businessMetadataName)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = await AddOrUpdateBusinessMetadataAttributesAsync(guid, businessMetadataName, content, context).ConfigureAwait(false); + return response; + } + + /// Add or update business metadata attributes. + /// The globally unique identifier of the entity. + /// BusinessMetadata name. + /// Business metadata attribute payload. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response AddOrUpdateBusinessMetadataAttributes(string guid, string businessMetadataName, IDictionary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(businessMetadataName, nameof(businessMetadataName)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = AddOrUpdateBusinessMetadataAttributes(guid, businessMetadataName, content, context); + return response; + } + + /// + /// [Protocol Method] Add or update business metadata attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// BusinessMetadata name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddOrUpdateBusinessMetadataAttributesAsync(string guid, string businessMetadataName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(businessMetadataName, nameof(businessMetadataName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddOrUpdateBusinessMetadataAttributes"); + scope.Start(); + try + { + using HttpMessage message = CreateAddOrUpdateBusinessMetadataAttributesRequest(guid, businessMetadataName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add or update business metadata attributes. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// BusinessMetadata name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddOrUpdateBusinessMetadataAttributes(string guid, string businessMetadataName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNullOrEmpty(businessMetadataName, nameof(businessMetadataName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddOrUpdateBusinessMetadataAttributes"); + scope.Start(); + try + { + using HttpMessage message = CreateAddOrUpdateBusinessMetadataAttributesRequest(guid, businessMetadataName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the sample Template for uploading/creating bulk BusinessMetaData. + /// The cancellation token to use. + /// + public virtual async Task> GetBusinessMetadataTemplateAsync(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetBusinessMetadataTemplateAsync(context).ConfigureAwait(false); + return Response.FromValue(response.Content, response); + } + + /// Get the sample Template for uploading/creating bulk BusinessMetaData. + /// The cancellation token to use. + /// + public virtual Response GetBusinessMetadataTemplate(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetBusinessMetadataTemplate(context); + return Response.FromValue(response.Content, response); + } + + /// + /// [Protocol Method] Get the sample Template for uploading/creating bulk BusinessMetaData + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetBusinessMetadataTemplateAsync(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("Entity.GetBusinessMetadataTemplate"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBusinessMetadataTemplateRequest(context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the sample Template for uploading/creating bulk BusinessMetaData + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetBusinessMetadataTemplate(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("Entity.GetBusinessMetadataTemplate"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBusinessMetadataTemplateRequest(context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Upload the file for creating Business Metadata in BULK. + /// InputStream of file. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> ImportBusinessMetadataAsync(BinaryData file, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(file, nameof(file)); + + RequestContext context = FromCancellationToken(cancellationToken); + ImportBusinessMetadataRequest importBusinessMetadataRequest = new ImportBusinessMetadataRequest(file); + Response response = await ImportBusinessMetadataAsync(importBusinessMetadataRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(BulkImportResult.FromResponse(response), response); + } + + /// Upload the file for creating Business Metadata in BULK. + /// InputStream of file. + /// The cancellation token to use. + /// is null. + /// + public virtual Response ImportBusinessMetadata(BinaryData file, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(file, nameof(file)); + + RequestContext context = FromCancellationToken(cancellationToken); + ImportBusinessMetadataRequest importBusinessMetadataRequest = new ImportBusinessMetadataRequest(file); + Response response = ImportBusinessMetadata(importBusinessMetadataRequest.ToRequestContent(), context); + return Response.FromValue(BulkImportResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Upload the file for creating Business Metadata in BULK + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ImportBusinessMetadataAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.ImportBusinessMetadata"); + scope.Start(); + try + { + using HttpMessage message = CreateImportBusinessMetadataRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Upload the file for creating Business Metadata in BULK + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response ImportBusinessMetadata(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.ImportBusinessMetadata"); + scope.Start(); + try + { + using HttpMessage message = CreateImportBusinessMetadataRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete given labels to a given entity. + /// The globally unique identifier of the entity. + /// set of labels to be deleted. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task RemoveLabelsAsync(string guid, IEnumerable body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await RemoveLabelsAsync(guid, content, context).ConfigureAwait(false); + return response; + } + + /// Delete given labels to a given entity. + /// The globally unique identifier of the entity. + /// set of labels to be deleted. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response RemoveLabels(string guid, IEnumerable body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = RemoveLabels(guid, content, context); + return response; + } + + /// + /// [Protocol Method] Delete given labels to a given entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RemoveLabelsAsync(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveLabels"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveLabelsRequest(guid, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete given labels to a given entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RemoveLabels(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveLabels"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveLabelsRequest(guid, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Set labels to a given entity. + /// The globally unique identifier of the entity. + /// set of labels to be set to the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task SetLabelsAsync(string guid, IEnumerable body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await SetLabelsAsync(guid, content, context).ConfigureAwait(false); + return response; + } + + /// Set labels to a given entity. + /// The globally unique identifier of the entity. + /// set of labels to be set to the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response SetLabels(string guid, IEnumerable body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = SetLabels(guid, content, context); + return response; + } + + /// + /// [Protocol Method] Set labels to a given entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task SetLabelsAsync(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.SetLabels"); + scope.Start(); + try + { + using HttpMessage message = CreateSetLabelsRequest(guid, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Set labels to a given entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response SetLabels(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.SetLabels"); + scope.Start(); + try + { + using HttpMessage message = CreateSetLabelsRequest(guid, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add given labels to a given entity. + /// The globally unique identifier of the entity. + /// set of labels to be added. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AddLabelAsync(string guid, IEnumerable body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await AddLabelAsync(guid, content, context).ConfigureAwait(false); + return response; + } + + /// Add given labels to a given entity. + /// The globally unique identifier of the entity. + /// set of labels to be added. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response AddLabel(string guid, IEnumerable body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = AddLabel(guid, content, context); + return response; + } + + /// + /// [Protocol Method] Add given labels to a given entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddLabelAsync(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddLabel"); + scope.Start(); + try + { + using HttpMessage message = CreateAddLabelRequest(guid, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add given labels to a given entity. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddLabel(string guid, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddLabel"); + scope.Start(); + try + { + using HttpMessage message = CreateAddLabelRequest(guid, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete given labels to a given entity identified by its type and unique + /// attribute. + /// + /// If labels is null/empty, no labels will be removed. + /// + /// If any labels + /// in labels set are non-existing labels, they will be ignored, only existing + /// labels will be removed. In addition to the typeName path parameter, attribute + /// key-value pair(s) can be provided in the following format: + /// attr:<attrName>=<attrValue>. NOTE: The attrName and attrValue should be unique + /// across entities, eg. qualifiedName. The REST request would look something like + /// this: DELETE + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// set of labels to be deleted. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task RemoveLabelsByUniqueAttributeAsync(string typeName, IEnumerable body = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await RemoveLabelsByUniqueAttributeAsync(typeName, content, attribute, context).ConfigureAwait(false); + return response; + } + + /// + /// Delete given labels to a given entity identified by its type and unique + /// attribute. + /// + /// If labels is null/empty, no labels will be removed. + /// + /// If any labels + /// in labels set are non-existing labels, they will be ignored, only existing + /// labels will be removed. In addition to the typeName path parameter, attribute + /// key-value pair(s) can be provided in the following format: + /// attr:<attrName>=<attrValue>. NOTE: The attrName and attrValue should be unique + /// across entities, eg. qualifiedName. The REST request would look something like + /// this: DELETE + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// set of labels to be deleted. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response RemoveLabelsByUniqueAttribute(string typeName, IEnumerable body = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = RemoveLabelsByUniqueAttribute(typeName, content, attribute, context); + return response; + } + + /// + /// [Protocol Method] Delete given labels to a given entity identified by its type and unique + /// attribute. + /// + /// If labels is null/empty, no labels will be removed. + /// + /// If any labels + /// in labels set are non-existing labels, they will be ignored, only existing + /// labels will be removed. In addition to the typeName path parameter, attribute + /// key-value pair(s) can be provided in the following format: + /// attr:<attrName>=<attrValue>. NOTE: The attrName and attrValue should be unique + /// across entities, eg. qualifiedName. The REST request would look something like + /// this: DELETE + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RemoveLabelsByUniqueAttributeAsync(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveLabelsByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveLabelsByUniqueAttributeRequest(typeName, content, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete given labels to a given entity identified by its type and unique + /// attribute. + /// + /// If labels is null/empty, no labels will be removed. + /// + /// If any labels + /// in labels set are non-existing labels, they will be ignored, only existing + /// labels will be removed. In addition to the typeName path parameter, attribute + /// key-value pair(s) can be provided in the following format: + /// attr:<attrName>=<attrValue>. NOTE: The attrName and attrValue should be unique + /// across entities, eg. qualifiedName. The REST request would look something like + /// this: DELETE + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RemoveLabelsByUniqueAttribute(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.RemoveLabelsByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveLabelsByUniqueAttributeRequest(typeName, content, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Set labels to a given entity identified by its type and unique attributes. + /// + /// If + /// labels is null/empty, existing labels will all be removed. + /// + /// In addition to the + /// typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: attr:<attrName>=<attrValue>. + /// + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: POST + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// set of labels to be set. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task SetLabelsByUniqueAttributeAsync(string typeName, IEnumerable body = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await SetLabelsByUniqueAttributeAsync(typeName, content, attribute, context).ConfigureAwait(false); + return response; + } + + /// + /// Set labels to a given entity identified by its type and unique attributes. + /// + /// If + /// labels is null/empty, existing labels will all be removed. + /// + /// In addition to the + /// typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: attr:<attrName>=<attrValue>. + /// + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: POST + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// set of labels to be set. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response SetLabelsByUniqueAttribute(string typeName, IEnumerable body = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = SetLabelsByUniqueAttribute(typeName, content, attribute, context); + return response; + } + + /// + /// [Protocol Method] Set labels to a given entity identified by its type and unique attributes. + /// + /// If + /// labels is null/empty, existing labels will all be removed. + /// + /// In addition to the + /// typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: attr:<attrName>=<attrValue>. + /// + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: POST + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task SetLabelsByUniqueAttributeAsync(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.SetLabelsByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateSetLabelsByUniqueAttributeRequest(typeName, content, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Set labels to a given entity identified by its type and unique attributes. + /// + /// If + /// labels is null/empty, existing labels will all be removed. + /// + /// In addition to the + /// typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: attr:<attrName>=<attrValue>. + /// + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: POST + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response SetLabelsByUniqueAttribute(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.SetLabelsByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateSetLabelsByUniqueAttributeRequest(typeName, content, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add given labels to a given entity identified by its type and unique + /// attributes. + /// + /// If labels is null/empty, no labels will be added. + /// + /// In addition to + /// the typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: attr:<attrName>=<attrValue>. + /// + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: PUT + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// set of labels to be added. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AddLabelsByUniqueAttributeAsync(string typeName, IEnumerable body = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await AddLabelsByUniqueAttributeAsync(typeName, content, attribute, context).ConfigureAwait(false); + return response; + } + + /// + /// Add given labels to a given entity identified by its type and unique + /// attributes. + /// + /// If labels is null/empty, no labels will be added. + /// + /// In addition to + /// the typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: attr:<attrName>=<attrValue>. + /// + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: PUT + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// set of labels to be added. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response AddLabelsByUniqueAttribute(string typeName, IEnumerable body = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = AddLabelsByUniqueAttribute(typeName, content, attribute, context); + return response; + } + + /// + /// [Protocol Method] Add given labels to a given entity identified by its type and unique + /// attributes. + /// + /// If labels is null/empty, no labels will be added. + /// + /// In addition to + /// the typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: attr:<attrName>=<attrValue>. + /// + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: PUT + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddLabelsByUniqueAttributeAsync(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddLabelsByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateAddLabelsByUniqueAttributeRequest(typeName, content, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add given labels to a given entity identified by its type and unique + /// attributes. + /// + /// If labels is null/empty, no labels will be added. + /// + /// In addition to + /// the typeName path parameter, attribute key-value pair(s) can be provided in the + /// following format: attr:<attrName>=<attrValue>. + /// + /// NOTE: The attrName and + /// attrValue should be unique across entities, eg. qualifiedName. + /// + /// The REST + /// request would look something like this: PUT + /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The content to send as the body of the request. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddLabelsByUniqueAttribute(string typeName, RequestContent content, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + using var scope = ClientDiagnostics.CreateScope("Entity.AddLabelsByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateAddLabelsByUniqueAttributeRequest(typeName, content, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Move existing entities to the target collection. + /// The collection where entities will be moved to. + /// MoveEntitiesOptions. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> MoveEntitiesToCollectionAsync(string collectionId, MoveEntitiesConfig moveEntitiesConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(collectionId, nameof(collectionId)); + Argument.AssertNotNull(moveEntitiesConfig, nameof(moveEntitiesConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = moveEntitiesConfig.ToRequestContent(); + Response response = await MoveEntitiesToCollectionAsync(collectionId, content, context).ConfigureAwait(false); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// Move existing entities to the target collection. + /// The collection where entities will be moved to. + /// MoveEntitiesOptions. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response MoveEntitiesToCollection(string collectionId, MoveEntitiesConfig moveEntitiesConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(collectionId, nameof(collectionId)); + Argument.AssertNotNull(moveEntitiesConfig, nameof(moveEntitiesConfig)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = moveEntitiesConfig.ToRequestContent(); + Response response = MoveEntitiesToCollection(collectionId, content, context); + return Response.FromValue(EntityMutationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Move existing entities to the target collection. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The collection where entities will be moved to. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task MoveEntitiesToCollectionAsync(string collectionId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(collectionId, nameof(collectionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.MoveEntitiesToCollection"); + scope.Start(); + try + { + using HttpMessage message = CreateMoveEntitiesToCollectionRequest(collectionId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Move existing entities to the target collection. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The collection where entities will be moved to. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response MoveEntitiesToCollection(string collectionId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(collectionId, nameof(collectionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Entity.MoveEntitiesToCollection"); + scope.Start(); + try + { + using HttpMessage message = CreateMoveEntitiesToCollectionRequest(collectionId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(RequestContent content, string businessAttributeUpdateBehavior, string collectionId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (businessAttributeUpdateBehavior != null) + { + uri.AppendQuery("businessAttributeUpdateBehavior", businessAttributeUpdateBehavior, true); + } + if (collectionId != null) + { + uri.AppendQuery("collectionId", collectionId, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetByIdsRequest(IEnumerable guid, bool? minExtInfo, bool? ignoreRelationships, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/bulk", false); + if (guid != null && Optional.IsCollectionDefined(guid)) + { + foreach (var param in guid) + { + uri.AppendQuery("guid", param, true); + } + } + uri.AppendQuery("api-version", _apiVersion, true); + if (minExtInfo != null) + { + uri.AppendQuery("minExtInfo", minExtInfo.Value, true); + } + if (ignoreRelationships != null) + { + uri.AppendQuery("ignoreRelationships", ignoreRelationships.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateBatchCreateOrUpdateRequest(RequestContent content, string collectionId, string businessAttributeUpdateBehavior, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/bulk", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (collectionId != null) + { + uri.AppendQuery("collectionId", collectionId, true); + } + if (businessAttributeUpdateBehavior != null) + { + uri.AppendQuery("businessAttributeUpdateBehavior", businessAttributeUpdateBehavior, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateBatchDeleteRequest(IEnumerable guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/bulk", false); + if (guid != null && Optional.IsCollectionDefined(guid)) + { + foreach (var param in guid) + { + uri.AppendQuery("guid", param, true); + } + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAddClassificationRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/bulk/classification", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetEntityRequest(string guid, bool? minExtInfo, bool? ignoreRelationships, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + if (minExtInfo != null) + { + uri.AppendQuery("minExtInfo", minExtInfo.Value, true); + } + if (ignoreRelationships != null) + { + uri.AppendQuery("ignoreRelationships", ignoreRelationships.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdateAttributeByIdRequest(string guid, string name, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendQuery("name", name, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetClassificationRequest(string guid, string classificationName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/classification/", false); + uri.AppendPath(classificationName, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateRemoveClassificationRequest(string guid, string classificationName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/classification/", false); + uri.AppendPath(classificationName, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetClassificationsRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/classifications", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAddClassificationsRequest(string guid, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/classifications", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateUpdateClassificationsRequest(string guid, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/classifications", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetByUniqueAttributeRequest(string typeName, bool? minExtInfo, bool? ignoreRelationships, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + if (minExtInfo != null) + { + uri.AppendQuery("minExtInfo", minExtInfo.Value, true); + } + if (ignoreRelationships != null) + { + uri.AppendQuery("ignoreRelationships", ignoreRelationships.Value, true); + } + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdateByUniqueAttributeRequest(string typeName, RequestContent content, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteByUniqueAttributeRequest(string typeName, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateRemoveClassificationByUniqueAttributeRequest(string typeName, string classificationName, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + uri.AppendPath("/classification/", false); + uri.AppendPath(classificationName, true); + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAddClassificationsByUniqueAttributeRequest(string typeName, RequestContent content, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + uri.AppendPath("/classifications", false); + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateUpdateClassificationsUniqueByAttributeRequest(string typeName, RequestContent content, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + uri.AppendPath("/classifications", false); + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateBatchSetClassificationsRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/bulk/setClassifications", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateBatchGetByUniqueAttributesRequest(string typeName, bool? minExtInfo, bool? ignoreRelationships, string attrNQualifiedName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/bulk/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + if (minExtInfo != null) + { + uri.AppendQuery("minExtInfo", minExtInfo.Value, true); + } + if (ignoreRelationships != null) + { + uri.AppendQuery("ignoreRelationships", ignoreRelationships.Value, true); + } + if (attrNQualifiedName != null) + { + uri.AppendQuery("attr_N:qualifiedName", attrNQualifiedName, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetHeaderRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/header", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateRemoveBusinessMetadataRequest(string guid, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/businessmetadata", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAddOrUpdateBusinessMetadataRequest(string guid, RequestContent content, bool? overwrite, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/businessmetadata", false); + if (overwrite != null) + { + uri.AppendQuery("isOverwrite", overwrite.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateRemoveBusinessMetadataAttributesRequest(string guid, string businessMetadataName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/businessmetadata/", false); + uri.AppendPath(businessMetadataName, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAddOrUpdateBusinessMetadataAttributesRequest(string guid, string businessMetadataName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/businessmetadata/", false); + uri.AppendPath(businessMetadataName, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetBusinessMetadataTemplateRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/businessmetadata/import/template", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/octet-stream"); + return message; + } + + internal HttpMessage CreateImportBusinessMetadataRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/businessmetadata/import", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("content-type", "multipart/form-data"); + request.Content = content; + return message; + } + + internal HttpMessage CreateRemoveLabelsRequest(string guid, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/labels", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateSetLabelsRequest(string guid, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/labels", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAddLabelRequest(string guid, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/guid/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/labels", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateRemoveLabelsByUniqueAttributeRequest(string typeName, RequestContent content, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + uri.AppendPath("/labels", false); + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateSetLabelsByUniqueAttributeRequest(string typeName, RequestContent content, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + uri.AppendPath("/labels", false); + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAddLabelsByUniqueAttributeRequest(string typeName, RequestContent content, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/entity/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + uri.AppendPath("/labels", false); + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateMoveEntitiesToCollectionRequest(string collectionId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/entity/moveTo", false); + uri.AppendQuery("collectionId", collectionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityMutationResult.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityMutationResult.Serialization.cs new file mode 100644 index 0000000000000..8478f18e03991 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityMutationResult.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class EntityMutationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityMutationResult)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(GuidAssignments)) + { + writer.WritePropertyName("guidAssignments"u8); + writer.WriteStartObject(); + foreach (var item in GuidAssignments) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(MutatedEntities)) + { + writer.WritePropertyName("mutatedEntities"u8); + writer.WriteStartObject(); + foreach (var item in MutatedEntities) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartArray(); + foreach (var item0 in item.Value) + { + writer.WriteObjectValue(item0); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(PartialUpdatedEntities)) + { + writer.WritePropertyName("partialUpdatedEntities"u8); + writer.WriteStartArray(); + foreach (var item in PartialUpdatedEntities) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + EntityMutationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityMutationResult)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityMutationResult(document.RootElement, options); + } + + internal static EntityMutationResult DeserializeEntityMutationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> guidAssignments = default; + Optional>> mutatedEntities = default; + Optional> partialUpdatedEntities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("guidAssignments"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + guidAssignments = dictionary; + continue; + } + if (property.NameEquals("mutatedEntities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(AtlasEntityHeader.DeserializeAtlasEntityHeader(item)); + } + dictionary.Add(property0.Name, array); + } + } + mutatedEntities = dictionary; + continue; + } + if (property.NameEquals("partialUpdatedEntities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasEntityHeader.DeserializeAtlasEntityHeader(item)); + } + partialUpdatedEntities = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new EntityMutationResult(Optional.ToDictionary(guidAssignments), Optional.ToDictionary(mutatedEntities), Optional.ToList(partialUpdatedEntities), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntityMutationResult)} does not support '{options.Format}' format."); + } + } + + EntityMutationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEntityMutationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityMutationResult)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EntityMutationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityMutationResult(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityMutationResult.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityMutationResult.cs new file mode 100644 index 0000000000000..088cbcb2b65d0 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityMutationResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The mutation response result of entity. + public partial class EntityMutationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal EntityMutationResult() + { + GuidAssignments = new ChangeTrackingDictionary(); + MutatedEntities = new ChangeTrackingDictionary>(); + PartialUpdatedEntities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A map of GUID assignments with entities. + /// The entity headers of mutated entities. + /// An array of entity headers that partially updated. + /// Keeps track of any properties unknown to the library. + internal EntityMutationResult(IReadOnlyDictionary guidAssignments, IReadOnlyDictionary> mutatedEntities, IReadOnlyList partialUpdatedEntities, IDictionary serializedAdditionalRawData) + { + GuidAssignments = guidAssignments; + MutatedEntities = mutatedEntities; + PartialUpdatedEntities = partialUpdatedEntities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A map of GUID assignments with entities. + public IReadOnlyDictionary GuidAssignments { get; } + /// The entity headers of mutated entities. + public IReadOnlyDictionary> MutatedEntities { get; } + /// An array of entity headers that partially updated. + public IReadOnlyList PartialUpdatedEntities { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityStatus.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityStatus.cs new file mode 100644 index 0000000000000..7521a9c79c319 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/EntityStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Status - can be active or deleted. + public readonly partial struct EntityStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EntityStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "ACTIVE"; + private const string DeletedValue = "DELETED"; + + /// The status is active. + public static EntityStatus Active { get; } = new EntityStatus(ActiveValue); + /// The status is deleted. + public static EntityStatus Deleted { get; } = new EntityStatus(DeletedValue); + /// Determines if two values are the same. + public static bool operator ==(EntityStatus left, EntityStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EntityStatus left, EntityStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EntityStatus(string value) => new EntityStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EntityStatus other && Equals(other); + /// + public bool Equals(EntityStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs new file mode 100644 index 0000000000000..5bb9bf686ab03 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs @@ -0,0 +1,4384 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Purview.DataMap +{ + // Data plane generated sub-client. + /// The Glossary sub-client. + public partial class Glossary + { + private static readonly string[] AuthorizationScopes = new string[] { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of Glossary for mocking. + protected Glossary() + { + } + + /// Initializes a new instance of Glossary. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// The to use. + /// The API version to use for this operation. + internal Glossary(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// + /// Get all glossaries. Recommend using limit/offset to get pagination result. + /// Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories + /// separately using + /// + /// 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + /// and + /// + /// 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + /// + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// Whether ignore terms and categories. + /// The cancellation token to use. + /// + public virtual async Task>> BatchGetAsync(int? limit = null, int? offset = null, string sort = null, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await BatchGetAsync(limit, offset, sort, ignoreTermsAndCategories, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossary.DeserializeAtlasGlossary(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// Get all glossaries. Recommend using limit/offset to get pagination result. + /// Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories + /// separately using + /// + /// 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + /// and + /// + /// 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + /// + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// Whether ignore terms and categories. + /// The cancellation token to use. + /// + public virtual Response> BatchGet(int? limit = null, int? offset = null, string sort = null, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = BatchGet(limit, offset, sort, ignoreTermsAndCategories, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossary.DeserializeAtlasGlossary(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get all glossaries. Recommend using limit/offset to get pagination result. + /// Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories + /// separately using + /// + /// 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + /// and + /// + /// 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// Whether ignore terms and categories. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task BatchGetAsync(int? limit, int? offset, string sort, bool? ignoreTermsAndCategories, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("Glossary.BatchGet"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchGetRequest(limit, offset, sort, ignoreTermsAndCategories, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get all glossaries. Recommend using limit/offset to get pagination result. + /// Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories + /// separately using + /// + /// 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + /// and + /// + /// 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// Whether ignore terms and categories. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response BatchGet(int? limit, int? offset, string sort, bool? ignoreTermsAndCategories, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("Glossary.BatchGet"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchGetRequest(limit, offset, sort, ignoreTermsAndCategories, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create a glossary. + /// The glossary object. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> CreateAsync(AtlasGlossary atlasGlossary, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossary.ToRequestContent(); + Response response = await CreateAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossary.FromResponse(response), response); + } + + /// Create a glossary. + /// The glossary object. + /// The cancellation token to use. + /// is null. + /// + public virtual Response Create(AtlasGlossary atlasGlossary, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossary.ToRequestContent(); + Response response = Create(content, context); + return Response.FromValue(AtlasGlossary.FromResponse(response), response); + } + + /// + /// [Protocol Method] Create a glossary. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a glossary. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Create(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create glossary category in bulk. + /// An array of glossary category definitions to be created. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task>> CreateCategoriesAsync(IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await CreateCategoriesAsync(content, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossaryCategory.DeserializeAtlasGlossaryCategory(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// Create glossary category in bulk. + /// An array of glossary category definitions to be created. + /// The cancellation token to use. + /// is null. + /// + public virtual Response> CreateCategories(IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = CreateCategories(content, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossaryCategory.DeserializeAtlasGlossaryCategory(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Create glossary category in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateCategoriesAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.CreateCategories"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateCategoriesRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create glossary category in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateCategories(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.CreateCategories"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateCategoriesRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create a glossary category. + /// The glossary category. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> CreateCategoryAsync(AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + Response response = await CreateCategoryAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); + } + + /// Create a glossary category. + /// The glossary category. + /// The cancellation token to use. + /// is null. + /// + public virtual Response CreateCategory(AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + Response response = CreateCategory(content, context); + return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); + } + + /// + /// [Protocol Method] Create a glossary category. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateCategoryAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.CreateCategory"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateCategoryRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a glossary category. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateCategory(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.CreateCategory"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateCategoryRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get specific glossary category by its GUID. + /// The globally unique identifier of the category. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetCategoryAsync(string categoryId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetCategoryAsync(categoryId, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); + } + + /// Get specific glossary category by its GUID. + /// The globally unique identifier of the category. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetCategory(string categoryId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetCategory(categoryId, context); + return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get specific glossary category by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetCategoryAsync(string categoryId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetCategory"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCategoryRequest(categoryId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get specific glossary category by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetCategory(string categoryId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetCategory"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCategoryRequest(categoryId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update the given glossary category by its GUID. + /// The globally unique identifier of the category. + /// The glossary category. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> UpdateCategoryAsync(string categoryId, AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + Response response = await UpdateCategoryAsync(categoryId, content, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); + } + + /// Update the given glossary category by its GUID. + /// The globally unique identifier of the category. + /// The glossary category. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response UpdateCategory(string categoryId, AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + Response response = UpdateCategory(categoryId, content, context); + return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update the given glossary category by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateCategoryAsync(string categoryId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.UpdateCategory"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateCategoryRequest(categoryId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update the given glossary category by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateCategory(string categoryId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.UpdateCategory"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateCategoryRequest(categoryId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a glossary category. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteCategoryAsync(string categoryId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.DeleteCategory"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteCategoryRequest(categoryId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a glossary category. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteCategory(string categoryId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.DeleteCategory"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteCategoryRequest(categoryId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the glossary category partially. So far we only supports partial + /// updating shortDescription and longDescription for category. + /// + /// The globally unique identifier of the category. + /// + /// A map containing keys as attribute names and values as corresponding attribute + /// values for partial update. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> PartialUpdateCategoryAsync(string categoryId, IDictionary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = await PartialUpdateCategoryAsync(categoryId, content, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); + } + + /// + /// Update the glossary category partially. So far we only supports partial + /// updating shortDescription and longDescription for category. + /// + /// The globally unique identifier of the category. + /// + /// A map containing keys as attribute names and values as corresponding attribute + /// values for partial update. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response PartialUpdateCategory(string categoryId, IDictionary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = PartialUpdateCategory(categoryId, content, context); + return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update the glossary category partially. So far we only supports partial + /// updating shortDescription and longDescription for category. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task PartialUpdateCategoryAsync(string categoryId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.PartialUpdateCategory"); + scope.Start(); + try + { + using HttpMessage message = CreatePartialUpdateCategoryRequest(categoryId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update the glossary category partially. So far we only supports partial + /// updating shortDescription and longDescription for category. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response PartialUpdateCategory(string categoryId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.PartialUpdateCategory"); + scope.Start(); + try + { + using HttpMessage message = CreatePartialUpdateCategoryRequest(categoryId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get all related categories (parent and children). Limit, offset, and sort + /// parameters are currently not being enabled and won't work even they are passed. + /// + /// The globally unique identifier of the category. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task>>> GetRelatedCategoriesAsync(string categoryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetRelatedCategoriesAsync(categoryId, limit, offset, sort, context).ConfigureAwait(false); + IReadOnlyDictionary> value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + Dictionary> dictionary = new Dictionary>(); + foreach (var property in document.RootElement.EnumerateObject()) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property.Name, null); + } + else + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedCategoryHeader.DeserializeAtlasRelatedCategoryHeader(item)); + } + dictionary.Add(property.Name, array); + } + } + value = dictionary; + return Response.FromValue(value, response); + } + + /// + /// Get all related categories (parent and children). Limit, offset, and sort + /// parameters are currently not being enabled and won't work even they are passed. + /// + /// The globally unique identifier of the category. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response>> GetRelatedCategories(string categoryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetRelatedCategories(categoryId, limit, offset, sort, context); + IReadOnlyDictionary> value = default; + using var document = JsonDocument.Parse(response.ContentStream); + Dictionary> dictionary = new Dictionary>(); + foreach (var property in document.RootElement.EnumerateObject()) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property.Name, null); + } + else + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedCategoryHeader.DeserializeAtlasRelatedCategoryHeader(item)); + } + dictionary.Add(property.Name, array); + } + } + value = dictionary; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get all related categories (parent and children). Limit, offset, and sort + /// parameters are currently not being enabled and won't work even they are passed. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetRelatedCategoriesAsync(string categoryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetRelatedCategories"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelatedCategoriesRequest(categoryId, limit, offset, sort, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get all related categories (parent and children). Limit, offset, and sort + /// parameters are currently not being enabled and won't work even they are passed. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetRelatedCategories(string categoryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetRelatedCategories"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelatedCategoriesRequest(categoryId, limit, offset, sort, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get all terms associated with the specific category. + /// The globally unique identifier of the category. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task>> GetCategoryTermsAsync(string categoryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetCategoryTermsAsync(categoryId, limit, offset, sort, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// Get all terms associated with the specific category. + /// The globally unique identifier of the category. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response> GetCategoryTerms(string categoryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetCategoryTerms(categoryId, limit, offset, sort, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get all terms associated with the specific category. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetCategoryTermsAsync(string categoryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetCategoryTerms"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCategoryTermsRequest(categoryId, limit, offset, sort, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get all terms associated with the specific category. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the category. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetCategoryTerms(string categoryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetCategoryTerms"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCategoryTermsRequest(categoryId, limit, offset, sort, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create a glossary term. + /// The glossary term. + /// Whether include term hierarchy. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> CreateTermAsync(AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + Response response = await CreateTermAsync(content, includeTermHierarchy, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); + } + + /// Create a glossary term. + /// The glossary term. + /// Whether include term hierarchy. + /// The cancellation token to use. + /// is null. + /// + public virtual Response CreateTerm(AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + Response response = CreateTerm(content, includeTermHierarchy, context); + return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); + } + + /// + /// [Protocol Method] Create a glossary term. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// Whether include term hierarchy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateTermAsync(RequestContent content, bool? includeTermHierarchy = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.CreateTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateTermRequest(content, includeTermHierarchy, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a glossary term. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// Whether include term hierarchy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateTerm(RequestContent content, bool? includeTermHierarchy = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.CreateTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateTermRequest(content, includeTermHierarchy, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a specific glossary term by its GUID. + /// The globally unique identifier for glossary term. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTermAsync(string termId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTermAsync(termId, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); + } + + /// Get a specific glossary term by its GUID. + /// The globally unique identifier for glossary term. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTerm(string termId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTerm(termId, context); + return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get a specific glossary term by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTermAsync(string termId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermRequest(termId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get a specific glossary term by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTerm(string termId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermRequest(termId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update the given glossary term by its GUID. + /// The globally unique identifier for glossary term. + /// The glossary term. + /// Whether include term hierarchy. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> UpdateTermAsync(string termId, AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + Response response = await UpdateTermAsync(termId, content, includeTermHierarchy, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); + } + + /// Update the given glossary term by its GUID. + /// The globally unique identifier for glossary term. + /// The glossary term. + /// Whether include term hierarchy. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response UpdateTerm(string termId, AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + Response response = UpdateTerm(termId, content, includeTermHierarchy, context); + return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update the given glossary term by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The content to send as the body of the request. + /// Whether include term hierarchy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateTermAsync(string termId, RequestContent content, bool? includeTermHierarchy = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.UpdateTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateTermRequest(termId, content, includeTermHierarchy, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update the given glossary term by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The content to send as the body of the request. + /// Whether include term hierarchy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateTerm(string termId, RequestContent content, bool? includeTermHierarchy = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.UpdateTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateTermRequest(termId, content, includeTermHierarchy, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a glossary term. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteTermAsync(string termId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.DeleteTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTermRequest(termId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a glossary term. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteTerm(string termId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.DeleteTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTermRequest(termId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the glossary term partially. So far we only supports partial updating + /// shortDescription, longDescription, abbreviation, usage and status for term. + /// + /// The globally unique identifier for glossary term. + /// + /// A map containing keys as attribute names and values as corresponding attribute + /// values to be updated. + /// + /// Whether include term hierarchy. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> PartialUpdateTermAsync(string termId, IDictionary body, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = await PartialUpdateTermAsync(termId, content, includeTermHierarchy, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); + } + + /// + /// Update the glossary term partially. So far we only supports partial updating + /// shortDescription, longDescription, abbreviation, usage and status for term. + /// + /// The globally unique identifier for glossary term. + /// + /// A map containing keys as attribute names and values as corresponding attribute + /// values to be updated. + /// + /// Whether include term hierarchy. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response PartialUpdateTerm(string termId, IDictionary body, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = PartialUpdateTerm(termId, content, includeTermHierarchy, context); + return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update the glossary term partially. So far we only supports partial updating + /// shortDescription, longDescription, abbreviation, usage and status for term. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The content to send as the body of the request. + /// Whether include term hierarchy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task PartialUpdateTermAsync(string termId, RequestContent content, bool? includeTermHierarchy = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.PartialUpdateTerm"); + scope.Start(); + try + { + using HttpMessage message = CreatePartialUpdateTermRequest(termId, content, includeTermHierarchy, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update the glossary term partially. So far we only supports partial updating + /// shortDescription, longDescription, abbreviation, usage and status for term. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The content to send as the body of the request. + /// Whether include term hierarchy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response PartialUpdateTerm(string termId, RequestContent content, bool? includeTermHierarchy = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.PartialUpdateTerm"); + scope.Start(); + try + { + using HttpMessage message = CreatePartialUpdateTermRequest(termId, content, includeTermHierarchy, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create glossary terms in bulk. + /// An array of glossary term definitions to be created in bulk. + /// Whether include term hierarchy. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task>> CreateTermsAsync(IEnumerable body, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await CreateTermsAsync(content, includeTermHierarchy, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossaryTerm.DeserializeAtlasGlossaryTerm(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// Create glossary terms in bulk. + /// An array of glossary term definitions to be created in bulk. + /// Whether include term hierarchy. + /// The cancellation token to use. + /// is null. + /// + public virtual Response> CreateTerms(IEnumerable body, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = CreateTerms(content, includeTermHierarchy, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossaryTerm.DeserializeAtlasGlossaryTerm(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Create glossary terms in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// Whether include term hierarchy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateTermsAsync(RequestContent content, bool? includeTermHierarchy = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.CreateTerms"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateTermsRequest(content, includeTermHierarchy, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create glossary terms in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// Whether include term hierarchy. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateTerms(RequestContent content, bool? includeTermHierarchy = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.CreateTerms"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateTermsRequest(content, includeTermHierarchy, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all related objects assigned with the specified term. Recommend using + /// limit/offset to get pagination result. + /// + /// The globally unique identifier for glossary term. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task>> GetEntitiesAssignedWithTermAsync(string termId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEntitiesAssignedWithTermAsync(termId, limit, offset, sort, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasRelatedObjectId.DeserializeAtlasRelatedObjectId(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// List all related objects assigned with the specified term. Recommend using + /// limit/offset to get pagination result. + /// + /// The globally unique identifier for glossary term. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response> GetEntitiesAssignedWithTerm(string termId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEntitiesAssignedWithTerm(termId, limit, offset, sort, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasRelatedObjectId.DeserializeAtlasRelatedObjectId(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] List all related objects assigned with the specified term. Recommend using + /// limit/offset to get pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetEntitiesAssignedWithTermAsync(string termId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetEntitiesAssignedWithTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEntitiesAssignedWithTermRequest(termId, limit, offset, sort, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] List all related objects assigned with the specified term. Recommend using + /// limit/offset to get pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetEntitiesAssignedWithTerm(string termId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetEntitiesAssignedWithTerm"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEntitiesAssignedWithTermRequest(termId, limit, offset, sort, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Assign the given term to the provided list of related objects. Recommend using + /// small batches with multiple API calls. + /// + /// [Entities Create Or Update + /// operation](https://learn.microsoft.com/en-us/rest/api/purview/datamapdataplane/entity/bulk-create-or-update?tabs=HTTP) + /// is an alternative to assign a term to multiple entities. + /// + /// The globally unique identifier for glossary term. + /// An array of related object IDs to which the term has to be associated. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AssignTermToEntitiesAsync(string termId, IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await AssignTermToEntitiesAsync(termId, content, context).ConfigureAwait(false); + return response; + } + + /// + /// Assign the given term to the provided list of related objects. Recommend using + /// small batches with multiple API calls. + /// + /// [Entities Create Or Update + /// operation](https://learn.microsoft.com/en-us/rest/api/purview/datamapdataplane/entity/bulk-create-or-update?tabs=HTTP) + /// is an alternative to assign a term to multiple entities. + /// + /// The globally unique identifier for glossary term. + /// An array of related object IDs to which the term has to be associated. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response AssignTermToEntities(string termId, IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = AssignTermToEntities(termId, content, context); + return response; + } + + /// + /// [Protocol Method] Assign the given term to the provided list of related objects. Recommend using + /// small batches with multiple API calls. + /// + /// [Entities Create Or Update + /// operation](https://learn.microsoft.com/en-us/rest/api/purview/datamapdataplane/entity/bulk-create-or-update?tabs=HTTP) + /// is an alternative to assign a term to multiple entities. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AssignTermToEntitiesAsync(string termId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.AssignTermToEntities"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignTermToEntitiesRequest(termId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Assign the given term to the provided list of related objects. Recommend using + /// small batches with multiple API calls. + /// + /// [Entities Create Or Update + /// operation](https://learn.microsoft.com/en-us/rest/api/purview/datamapdataplane/entity/bulk-create-or-update?tabs=HTTP) + /// is an alternative to assign a term to multiple entities. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AssignTermToEntities(string termId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.AssignTermToEntities"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignTermToEntitiesRequest(termId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete the term assignment for the given list of related objects. + /// The globally unique identifier for glossary term. + /// An array of related object IDs from which the term has to be dissociated. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task DeleteTermAssignmentFromEntitiesAsync(string termId, IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = await DeleteTermAssignmentFromEntitiesAsync(termId, content, context).ConfigureAwait(false); + return response; + } + + /// Delete the term assignment for the given list of related objects. + /// The globally unique identifier for glossary term. + /// An array of related object IDs from which the term has to be dissociated. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response DeleteTermAssignmentFromEntities(string termId, IEnumerable body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromEnumerable(body); + Response response = DeleteTermAssignmentFromEntities(termId, content, context); + return response; + } + + /// + /// [Protocol Method] Delete the term assignment for the given list of related objects. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteTermAssignmentFromEntitiesAsync(string termId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.DeleteTermAssignmentFromEntities"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTermAssignmentFromEntitiesRequest(termId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete the term assignment for the given list of related objects. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteTermAssignmentFromEntities(string termId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.DeleteTermAssignmentFromEntities"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTermAssignmentFromEntitiesRequest(termId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get all related terms for a specific term by its GUID. Limit, offset, and sort + /// parameters are currently not being enabled and won't work even they are passed. + /// + /// The globally unique identifier for glossary term. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task>>> GetRelatedTermsAsync(string termId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetRelatedTermsAsync(termId, limit, offset, sort, context).ConfigureAwait(false); + IReadOnlyDictionary> value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + Dictionary> dictionary = new Dictionary>(); + foreach (var property in document.RootElement.EnumerateObject()) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property.Name, null); + } + else + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + dictionary.Add(property.Name, array); + } + } + value = dictionary; + return Response.FromValue(value, response); + } + + /// + /// Get all related terms for a specific term by its GUID. Limit, offset, and sort + /// parameters are currently not being enabled and won't work even they are passed. + /// + /// The globally unique identifier for glossary term. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response>> GetRelatedTerms(string termId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetRelatedTerms(termId, limit, offset, sort, context); + IReadOnlyDictionary> value = default; + using var document = JsonDocument.Parse(response.ContentStream); + Dictionary> dictionary = new Dictionary>(); + foreach (var property in document.RootElement.EnumerateObject()) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property.Name, null); + } + else + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + dictionary.Add(property.Name, array); + } + } + value = dictionary; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get all related terms for a specific term by its GUID. Limit, offset, and sort + /// parameters are currently not being enabled and won't work even they are passed. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetRelatedTermsAsync(string termId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetRelatedTerms"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelatedTermsRequest(termId, limit, offset, sort, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get all related terms for a specific term by its GUID. Limit, offset, and sort + /// parameters are currently not being enabled and won't work even they are passed. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary term. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetRelatedTerms(string termId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(termId, nameof(termId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetRelatedTerms"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelatedTermsRequest(termId, limit, offset, sort, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a specific Glossary by its GUID. + /// The globally unique identifier for glossary. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetGlossaryAsync(string glossaryId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetGlossaryAsync(glossaryId, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossary.FromResponse(response), response); + } + + /// Get a specific Glossary by its GUID. + /// The globally unique identifier for glossary. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetGlossary(string glossaryId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetGlossary(glossaryId, context); + return Response.FromValue(AtlasGlossary.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get a specific Glossary by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetGlossaryAsync(string glossaryId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetGlossary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetGlossaryRequest(glossaryId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get a specific Glossary by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetGlossary(string glossaryId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetGlossary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetGlossaryRequest(glossaryId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update the given glossary. + /// The globally unique identifier for glossary. + /// The glossary object. + /// Whether ignore terms and categories. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> UpdateAsync(string glossaryId, AtlasGlossary atlasGlossary, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossary.ToRequestContent(); + Response response = await UpdateAsync(glossaryId, content, ignoreTermsAndCategories, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossary.FromResponse(response), response); + } + + /// Update the given glossary. + /// The globally unique identifier for glossary. + /// The glossary object. + /// Whether ignore terms and categories. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response Update(string glossaryId, AtlasGlossary atlasGlossary, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasGlossary.ToRequestContent(); + Response response = Update(glossaryId, content, ignoreTermsAndCategories, context); + return Response.FromValue(AtlasGlossary.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update the given glossary. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The content to send as the body of the request. + /// Whether ignore terms and categories. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateAsync(string glossaryId, RequestContent content, bool? ignoreTermsAndCategories = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.Update"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateRequest(glossaryId, content, ignoreTermsAndCategories, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update the given glossary. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The content to send as the body of the request. + /// Whether ignore terms and categories. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Update(string glossaryId, RequestContent content, bool? ignoreTermsAndCategories = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.Update"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateRequest(glossaryId, content, ignoreTermsAndCategories, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a glossary. Will delete underlying terms/categories together. Recommend + /// separate delete terms and categories. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteAsync(string glossaryId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(glossaryId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a glossary. Will delete underlying terms/categories together. Recommend + /// separate delete terms and categories. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Delete(string glossaryId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(glossaryId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the categories belonging to a specific glossary. Recommend using + /// limit/offset to get pagination result. + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task>> GetCategoriesAsync(string glossaryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetCategoriesAsync(glossaryId, limit, offset, sort, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossaryCategory.DeserializeAtlasGlossaryCategory(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// Get the categories belonging to a specific glossary. Recommend using + /// limit/offset to get pagination result. + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response> GetCategories(string glossaryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetCategories(glossaryId, limit, offset, sort, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossaryCategory.DeserializeAtlasGlossaryCategory(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get the categories belonging to a specific glossary. Recommend using + /// limit/offset to get pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetCategoriesAsync(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetCategories"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCategoriesRequest(glossaryId, limit, offset, sort, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the categories belonging to a specific glossary. Recommend using + /// limit/offset to get pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetCategories(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetCategories"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCategoriesRequest(glossaryId, limit, offset, sort, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the category headers belonging to a specific glossary. Recommend using + /// limit/offset to get pagination result. + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task>> GetCategoriesHeadersAsync(string glossaryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetCategoriesHeadersAsync(glossaryId, limit, offset, sort, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasRelatedCategoryHeader.DeserializeAtlasRelatedCategoryHeader(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// Get the category headers belonging to a specific glossary. Recommend using + /// limit/offset to get pagination result. + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response> GetCategoriesHeaders(string glossaryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetCategoriesHeaders(glossaryId, limit, offset, sort, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasRelatedCategoryHeader.DeserializeAtlasRelatedCategoryHeader(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get the category headers belonging to a specific glossary. Recommend using + /// limit/offset to get pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetCategoriesHeadersAsync(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetCategoriesHeaders"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCategoriesHeadersRequest(glossaryId, limit, offset, sort, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the category headers belonging to a specific glossary. Recommend using + /// limit/offset to get pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetCategoriesHeaders(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetCategoriesHeaders"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCategoriesHeadersRequest(glossaryId, limit, offset, sort, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a specific glossary with detailed information. This API is not + /// recommend. + /// + /// Recommend to fetch terms/categories details separately using + /// + /// GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms and + /// + /// GET /datamap/api/atlas/v2/glossary/{glossaryId}/categories. + /// + /// The globally unique identifier for glossary. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDetailedAsync(string glossaryId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDetailedAsync(glossaryId, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossaryExtInfo.FromResponse(response), response); + } + + /// + /// Get a specific glossary with detailed information. This API is not + /// recommend. + /// + /// Recommend to fetch terms/categories details separately using + /// + /// GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms and + /// + /// GET /datamap/api/atlas/v2/glossary/{glossaryId}/categories. + /// + /// The globally unique identifier for glossary. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDetailed(string glossaryId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDetailed(glossaryId, context); + return Response.FromValue(AtlasGlossaryExtInfo.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get a specific glossary with detailed information. This API is not + /// recommend. + /// + /// Recommend to fetch terms/categories details separately using + /// + /// GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms and + /// + /// GET /datamap/api/atlas/v2/glossary/{glossaryId}/categories. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetDetailedAsync(string glossaryId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetDetailed"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDetailedRequest(glossaryId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get a specific glossary with detailed information. This API is not + /// recommend. + /// + /// Recommend to fetch terms/categories details separately using + /// + /// GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms and + /// + /// GET /datamap/api/atlas/v2/glossary/{glossaryId}/categories. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetDetailed(string glossaryId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetDetailed"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDetailedRequest(glossaryId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the glossary partially. Some properties such as qualifiedName are not + /// allowed to be updated. + /// + /// So far we only supports partial updating + /// shortDescription, longDescription, language and usage for glossary. + /// + /// Recommend + /// using 'ignoreTermsAndCategories=true' to reduce response body size. + /// + /// The globally unique identifier for glossary. + /// + /// A map containing keys as attribute names and values as corresponding attribute + /// values. + /// + /// Whether ignore terms and categories. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> PartialUpdateAsync(string glossaryId, IDictionary body, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = await PartialUpdateAsync(glossaryId, content, ignoreTermsAndCategories, context).ConfigureAwait(false); + return Response.FromValue(AtlasGlossary.FromResponse(response), response); + } + + /// + /// Update the glossary partially. Some properties such as qualifiedName are not + /// allowed to be updated. + /// + /// So far we only supports partial updating + /// shortDescription, longDescription, language and usage for glossary. + /// + /// Recommend + /// using 'ignoreTermsAndCategories=true' to reduce response body size. + /// + /// The globally unique identifier for glossary. + /// + /// A map containing keys as attribute names and values as corresponding attribute + /// values. + /// + /// Whether ignore terms and categories. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response PartialUpdate(string glossaryId, IDictionary body, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = RequestContentHelper.FromDictionary(body); + Response response = PartialUpdate(glossaryId, content, ignoreTermsAndCategories, context); + return Response.FromValue(AtlasGlossary.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update the glossary partially. Some properties such as qualifiedName are not + /// allowed to be updated. + /// + /// So far we only supports partial updating + /// shortDescription, longDescription, language and usage for glossary. + /// + /// Recommend + /// using 'ignoreTermsAndCategories=true' to reduce response body size. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The content to send as the body of the request. + /// Whether ignore terms and categories. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task PartialUpdateAsync(string glossaryId, RequestContent content, bool? ignoreTermsAndCategories = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.PartialUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreatePartialUpdateRequest(glossaryId, content, ignoreTermsAndCategories, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update the glossary partially. Some properties such as qualifiedName are not + /// allowed to be updated. + /// + /// So far we only supports partial updating + /// shortDescription, longDescription, language and usage for glossary. + /// + /// Recommend + /// using 'ignoreTermsAndCategories=true' to reduce response body size. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The content to send as the body of the request. + /// Whether ignore terms and categories. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response PartialUpdate(string glossaryId, RequestContent content, bool? ignoreTermsAndCategories = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.PartialUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreatePartialUpdateRequest(glossaryId, content, ignoreTermsAndCategories, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get terms belonging to a specific glossary. Recommend using limit/offset to get + /// pagination result. + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task>> GetTermsAsync(string glossaryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTermsAsync(glossaryId, limit, offset, sort, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossaryTerm.DeserializeAtlasGlossaryTerm(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// Get terms belonging to a specific glossary. Recommend using limit/offset to get + /// pagination result. + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response> GetTerms(string glossaryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTerms(glossaryId, limit, offset, sort, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasGlossaryTerm.DeserializeAtlasGlossaryTerm(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get terms belonging to a specific glossary. Recommend using limit/offset to get + /// pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTermsAsync(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetTerms"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermsRequest(glossaryId, limit, offset, sort, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get terms belonging to a specific glossary. Recommend using limit/offset to get + /// pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTerms(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetTerms"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermsRequest(glossaryId, limit, offset, sort, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get term headers belonging to a specific glossary. Recommend using limit/offset + /// to get pagination result. + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task>> GetTermHeadersAsync(string glossaryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTermHeadersAsync(glossaryId, limit, offset, sort, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// Get term headers belonging to a specific glossary. Recommend using limit/offset + /// to get pagination result. + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response> GetTermHeaders(string glossaryId, int? limit = null, int? offset = null, string sort = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTermHeaders(glossaryId, limit, offset, sort, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasRelatedTermHeader.DeserializeAtlasRelatedTermHeader(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get term headers belonging to a specific glossary. Recommend using limit/offset + /// to get pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTermHeadersAsync(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetTermHeaders"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermHeadersRequest(glossaryId, limit, offset, sort, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get term headers belonging to a specific glossary. Recommend using limit/offset + /// to get pagination result. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier for glossary. + /// The page size - by default there is no paging. + /// The offset for pagination purpose. + /// The sort order, ASC (default) or DESC. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTermHeaders(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); + + using var scope = ClientDiagnostics.CreateScope("Glossary.GetTermHeaders"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermHeadersRequest(glossaryId, limit, offset, sort, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateBatchGetRequest(int? limit, int? offset, string sort, bool? ignoreTermsAndCategories, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (sort != null) + { + uri.AppendQuery("sort", sort, true); + } + if (ignoreTermsAndCategories != null) + { + uri.AppendQuery("ignoreTermsAndCategories", ignoreTermsAndCategories.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateCreateCategoriesRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/categories", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateCreateCategoryRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/category", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetCategoryRequest(string categoryId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/category/", false); + uri.AppendPath(categoryId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdateCategoryRequest(string categoryId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/category/", false); + uri.AppendPath(categoryId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteCategoryRequest(string categoryId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/category/", false); + uri.AppendPath(categoryId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreatePartialUpdateCategoryRequest(string categoryId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/category/", false); + uri.AppendPath(categoryId, true); + uri.AppendPath("/partial", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetRelatedCategoriesRequest(string categoryId, int? limit, int? offset, string sort, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/category/", false); + uri.AppendPath(categoryId, true); + uri.AppendPath("/related", false); + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (sort != null) + { + uri.AppendQuery("sort", sort, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetCategoryTermsRequest(string categoryId, int? limit, int? offset, string sort, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/category/", false); + uri.AppendPath(categoryId, true); + uri.AppendPath("/terms", false); + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (sort != null) + { + uri.AppendQuery("sort", sort, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateTermRequest(RequestContent content, bool? includeTermHierarchy, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/term", false); + if (includeTermHierarchy != null) + { + uri.AppendQuery("includeTermHierarchy", includeTermHierarchy.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetTermRequest(string termId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/term/", false); + uri.AppendPath(termId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdateTermRequest(string termId, RequestContent content, bool? includeTermHierarchy, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/term/", false); + uri.AppendPath(termId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (includeTermHierarchy != null) + { + uri.AppendQuery("includeTermHierarchy", includeTermHierarchy.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteTermRequest(string termId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/term/", false); + uri.AppendPath(termId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreatePartialUpdateTermRequest(string termId, RequestContent content, bool? includeTermHierarchy, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/term/", false); + uri.AppendPath(termId, true); + uri.AppendPath("/partial", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (includeTermHierarchy != null) + { + uri.AppendQuery("includeTermHierarchy", includeTermHierarchy.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateCreateTermsRequest(RequestContent content, bool? includeTermHierarchy, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/terms", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (includeTermHierarchy != null) + { + uri.AppendQuery("includeTermHierarchy", includeTermHierarchy.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetEntitiesAssignedWithTermRequest(string termId, int? limit, int? offset, string sort, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/terms/", false); + uri.AppendPath(termId, true); + uri.AppendPath("/assignedEntities", false); + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (sort != null) + { + uri.AppendQuery("sort", sort, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAssignTermToEntitiesRequest(string termId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/terms/", false); + uri.AppendPath(termId, true); + uri.AppendPath("/assignedEntities", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteTermAssignmentFromEntitiesRequest(string termId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/terms/", false); + uri.AppendPath(termId, true); + uri.AppendPath("/assignedEntities", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetRelatedTermsRequest(string termId, int? limit, int? offset, string sort, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/terms/", false); + uri.AppendPath(termId, true); + uri.AppendPath("/related", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (sort != null) + { + uri.AppendQuery("sort", sort, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetGlossaryRequest(string glossaryId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/", false); + uri.AppendPath(glossaryId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateUpdateRequest(string glossaryId, RequestContent content, bool? ignoreTermsAndCategories, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/", false); + uri.AppendPath(glossaryId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (ignoreTermsAndCategories != null) + { + uri.AppendQuery("ignoreTermsAndCategories", ignoreTermsAndCategories.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteRequest(string glossaryId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/", false); + uri.AppendPath(glossaryId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetCategoriesRequest(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/", false); + uri.AppendPath(glossaryId, true); + uri.AppendPath("/categories", false); + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (sort != null) + { + uri.AppendQuery("sort", sort, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetCategoriesHeadersRequest(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/", false); + uri.AppendPath(glossaryId, true); + uri.AppendPath("/categories/headers", false); + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (sort != null) + { + uri.AppendQuery("sort", sort, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDetailedRequest(string glossaryId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/", false); + uri.AppendPath(glossaryId, true); + uri.AppendPath("/detailed", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreatePartialUpdateRequest(string glossaryId, RequestContent content, bool? ignoreTermsAndCategories, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/", false); + uri.AppendPath(glossaryId, true); + uri.AppendPath("/partial", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (ignoreTermsAndCategories != null) + { + uri.AppendQuery("ignoreTermsAndCategories", ignoreTermsAndCategories.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetTermsRequest(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/", false); + uri.AppendPath(glossaryId, true); + uri.AppendPath("/terms", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (sort != null) + { + uri.AppendQuery("sort", sort, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTermHeadersRequest(string glossaryId, int? limit, int? offset, string sort, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/glossary/", false); + uri.AppendPath(glossaryId, true); + uri.AppendPath("/terms/headers", false); + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (sort != null) + { + uri.AppendQuery("sort", sort, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportBusinessMetadataRequest.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportBusinessMetadataRequest.Serialization.cs new file mode 100644 index 0000000000000..4a60d2d590910 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportBusinessMetadataRequest.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + internal partial class ImportBusinessMetadataRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportBusinessMetadataRequest)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("file"u8); + writer.WriteBase64StringValue(File.ToArray(), "D"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ImportBusinessMetadataRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportBusinessMetadataRequest)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImportBusinessMetadataRequest(document.RootElement, options); + } + + internal static ImportBusinessMetadataRequest DeserializeImportBusinessMetadataRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData file = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("file"u8)) + { + file = BinaryData.FromBytes(property.Value.GetBytesFromBase64("D")); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ImportBusinessMetadataRequest(file, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImportBusinessMetadataRequest)} does not support '{options.Format}' format."); + } + } + + ImportBusinessMetadataRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeImportBusinessMetadataRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImportBusinessMetadataRequest)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ImportBusinessMetadataRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeImportBusinessMetadataRequest(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportBusinessMetadataRequest.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportBusinessMetadataRequest.cs new file mode 100644 index 0000000000000..b3bc9916a751e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportBusinessMetadataRequest.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The ImportBusinessMetadataRequest. + internal partial class ImportBusinessMetadataRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// InputStream of file. + /// is null. + public ImportBusinessMetadataRequest(BinaryData file) + { + Argument.AssertNotNull(file, nameof(file)); + + File = file; + } + + /// Initializes a new instance of . + /// InputStream of file. + /// Keeps track of any properties unknown to the library. + internal ImportBusinessMetadataRequest(BinaryData file, IDictionary serializedAdditionalRawData) + { + File = file; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImportBusinessMetadataRequest() + { + } + + /// + /// InputStream of file + /// + /// To assign a byte[] to this property use . + /// The byte[] will be serialized to a Base64 encoded string. + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromBytes(new byte[] { 1, 2, 3 }) + /// Creates a payload of "AQID". + /// + /// + /// + /// + public BinaryData File { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportInfo.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportInfo.Serialization.cs new file mode 100644 index 0000000000000..3305612b1fefe --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportInfo.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class ImportInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportInfo)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ChildObjectName)) + { + writer.WritePropertyName("childObjectName"u8); + writer.WriteStringValue(ChildObjectName); + } + if (Optional.IsDefined(ImportStatus)) + { + writer.WritePropertyName("importStatus"u8); + writer.WriteStringValue(ImportStatus.Value.ToString()); + } + if (Optional.IsDefined(ParentObjectName)) + { + writer.WritePropertyName("parentObjectName"u8); + writer.WriteStringValue(ParentObjectName); + } + if (Optional.IsDefined(Remarks)) + { + writer.WritePropertyName("remarks"u8); + writer.WriteStringValue(Remarks); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ImportInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportInfo)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImportInfo(document.RootElement, options); + } + + internal static ImportInfo DeserializeImportInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional childObjectName = default; + Optional importStatus = default; + Optional parentObjectName = default; + Optional remarks = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("childObjectName"u8)) + { + childObjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("importStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + importStatus = new ImportStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("parentObjectName"u8)) + { + parentObjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("remarks"u8)) + { + remarks = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ImportInfo(childObjectName.Value, Optional.ToNullable(importStatus), parentObjectName.Value, remarks.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImportInfo)} does not support '{options.Format}' format."); + } + } + + ImportInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeImportInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImportInfo)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ImportInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeImportInfo(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportInfo.cs new file mode 100644 index 0000000000000..59b5699413d72 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportInfo.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// ImportInfo. + public partial class ImportInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ImportInfo() + { + } + + /// Initializes a new instance of . + /// childObjectName. + /// importStatus. + /// parentObjectName. + /// remarks. + /// Keeps track of any properties unknown to the library. + internal ImportInfo(string childObjectName, ImportStatus? importStatus, string parentObjectName, string remarks, IDictionary serializedAdditionalRawData) + { + ChildObjectName = childObjectName; + ImportStatus = importStatus; + ParentObjectName = parentObjectName; + Remarks = remarks; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// childObjectName. + public string ChildObjectName { get; } + /// importStatus. + public ImportStatus? ImportStatus { get; } + /// parentObjectName. + public string ParentObjectName { get; } + /// remarks. + public string Remarks { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportStatus.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportStatus.cs new file mode 100644 index 0000000000000..92997bc1c4f38 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ImportStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Status for import. + public readonly partial struct ImportStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ImportStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SuccessValue = "SUCCESS"; + private const string FailedValue = "FAILED"; + + /// Success. + public static ImportStatus Success { get; } = new ImportStatus(SuccessValue); + /// Failed. + public static ImportStatus Failed { get; } = new ImportStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ImportStatus left, ImportStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ImportStatus left, ImportStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ImportStatus(string value) => new ImportStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ImportStatus other && Equals(other); + /// + public bool Equals(ImportStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs new file mode 100644 index 0000000000000..52697a73d3f02 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs @@ -0,0 +1,581 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Purview.DataMap +{ + // Data plane generated sub-client. + /// The Lineage sub-client. + public partial class Lineage + { + private static readonly string[] AuthorizationScopes = new string[] { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of Lineage for mocking. + protected Lineage() + { + } + + /// Initializes a new instance of Lineage. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// The to use. + /// The API version to use for this operation. + internal Lineage(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get lineage info of the entity specified by GUID. + /// The globally unique identifier of the entity. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. + /// The number of hops for lineage. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetLineageAsync(string guid, LineageDirection direction, int? depth = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetLineageAsync(guid, direction.ToString(), depth, context).ConfigureAwait(false); + return Response.FromValue(AtlasLineageInfo.FromResponse(response), response); + } + + /// Get lineage info of the entity specified by GUID. + /// The globally unique identifier of the entity. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. + /// The number of hops for lineage. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetLineage(string guid, LineageDirection direction, int? depth = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetLineage(guid, direction.ToString(), depth, context); + return Response.FromValue(AtlasLineageInfo.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get lineage info of the entity specified by GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Allowed values: "INPUT" | "OUTPUT" | "BOTH". + /// The number of hops for lineage. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetLineageAsync(string guid, string direction, int? depth = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(direction, nameof(direction)); + + using var scope = ClientDiagnostics.CreateScope("Lineage.GetLineage"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLineageRequest(guid, direction, depth, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get lineage info of the entity specified by GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Allowed values: "INPUT" | "OUTPUT" | "BOTH". + /// The number of hops for lineage. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetLineage(string guid, string direction, int? depth = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(direction, nameof(direction)); + + using var scope = ClientDiagnostics.CreateScope("Lineage.GetLineage"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLineageRequest(guid, direction, depth, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Return immediate next page lineage info about entity with pagination. + /// The globally unique identifier of the entity. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. + /// The offset for pagination purpose. + /// The page size - by default there is no paging. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetNextPageAsync(string guid, LineageDirection direction, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetNextPageAsync(guid, direction.ToString(), offset, limit, context).ConfigureAwait(false); + return Response.FromValue(AtlasLineageInfo.FromResponse(response), response); + } + + /// Return immediate next page lineage info about entity with pagination. + /// The globally unique identifier of the entity. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. + /// The offset for pagination purpose. + /// The page size - by default there is no paging. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetNextPage(string guid, LineageDirection direction, int? offset = null, int? limit = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetNextPage(guid, direction.ToString(), offset, limit, context); + return Response.FromValue(AtlasLineageInfo.FromResponse(response), response); + } + + /// + /// [Protocol Method] Return immediate next page lineage info about entity with pagination + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Allowed values: "INPUT" | "OUTPUT" | "BOTH". + /// The offset for pagination purpose. + /// The page size - by default there is no paging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetNextPageAsync(string guid, string direction, int? offset = null, int? limit = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(direction, nameof(direction)); + + using var scope = ClientDiagnostics.CreateScope("Lineage.GetNextPage"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNextPageRequest(guid, direction, offset, limit, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Return immediate next page lineage info about entity with pagination + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Allowed values: "INPUT" | "OUTPUT" | "BOTH". + /// The offset for pagination purpose. + /// The page size - by default there is no paging. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetNextPage(string guid, string direction, int? offset = null, int? limit = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + Argument.AssertNotNull(direction, nameof(direction)); + + using var scope = ClientDiagnostics.CreateScope("Lineage.GetNextPage"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNextPageRequest(guid, direction, offset, limit, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Return lineage info about entity. + /// + /// In addition to the typeName path parameter, + /// attribute key-value pair(s) can be provided in the following + /// format + /// + /// attr:[attrName]=[attrValue] + /// + /// NOTE: The attrName and attrValue should be + /// unique across entities, eg. qualifiedName. + /// + /// The REST request would look + /// something like this: + /// + /// GET + /// /v2/lineage/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. + /// The number of hops for lineage. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetByUniqueAttributeAsync(string typeName, LineageDirection direction, int? depth = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetByUniqueAttributeAsync(typeName, direction.ToString(), depth, attribute, context).ConfigureAwait(false); + return Response.FromValue(AtlasLineageInfo.FromResponse(response), response); + } + + /// + /// Return lineage info about entity. + /// + /// In addition to the typeName path parameter, + /// attribute key-value pair(s) can be provided in the following + /// format + /// + /// attr:[attrName]=[attrValue] + /// + /// NOTE: The attrName and attrValue should be + /// unique across entities, eg. qualifiedName. + /// + /// The REST request would look + /// something like this: + /// + /// GET + /// /v2/lineage/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// The name of the type. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. + /// The number of hops for lineage. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetByUniqueAttribute(string typeName, LineageDirection direction, int? depth = null, string attribute = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetByUniqueAttribute(typeName, direction.ToString(), depth, attribute, context); + return Response.FromValue(AtlasLineageInfo.FromResponse(response), response); + } + + /// + /// [Protocol Method] Return lineage info about entity. + /// + /// In addition to the typeName path parameter, + /// attribute key-value pair(s) can be provided in the following + /// format + /// + /// attr:[attrName]=[attrValue] + /// + /// NOTE: The attrName and attrValue should be + /// unique across entities, eg. qualifiedName. + /// + /// The REST request would look + /// something like this: + /// + /// GET + /// /v2/lineage/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Allowed values: "INPUT" | "OUTPUT" | "BOTH". + /// The number of hops for lineage. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetByUniqueAttributeAsync(string typeName, string direction, int? depth = null, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(direction, nameof(direction)); + + using var scope = ClientDiagnostics.CreateScope("Lineage.GetByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByUniqueAttributeRequest(typeName, direction, depth, attribute, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Return lineage info about entity. + /// + /// In addition to the typeName path parameter, + /// attribute key-value pair(s) can be provided in the following + /// format + /// + /// attr:[attrName]=[attrValue] + /// + /// NOTE: The attrName and attrValue should be + /// unique across entities, eg. qualifiedName. + /// + /// The REST request would look + /// something like this: + /// + /// GET + /// /v2/lineage/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Allowed values: "INPUT" | "OUTPUT" | "BOTH". + /// The number of hops for lineage. + /// + /// The qualified name of the entity. (This is only an example. qualifiedName can + /// be changed to other unique attributes) + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetByUniqueAttribute(string typeName, string direction, int? depth = null, string attribute = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); + Argument.AssertNotNull(direction, nameof(direction)); + + using var scope = ClientDiagnostics.CreateScope("Lineage.GetByUniqueAttribute"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByUniqueAttributeRequest(typeName, direction, depth, attribute, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetLineageRequest(string guid, string direction, int? depth, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/lineage/", false); + uri.AppendPath(guid, true); + uri.AppendQuery("direction", direction, true); + if (depth != null) + { + uri.AppendQuery("depth", depth.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetNextPageRequest(string guid, string direction, int? offset, int? limit, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/lineage/", false); + uri.AppendPath(guid, true); + uri.AppendPath("/next", false); + uri.AppendQuery("direction", direction, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (limit != null) + { + uri.AppendQuery("limit", limit.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetByUniqueAttributeRequest(string typeName, string direction, int? depth, string attribute, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/lineage/uniqueAttribute/type/", false); + uri.AppendPath(typeName, true); + uri.AppendQuery("direction", direction, true); + if (depth != null) + { + uri.AppendQuery("depth", depth.Value, true); + } + if (attribute != null) + { + uri.AppendQuery("attr:qualifiedName", attribute, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageDirection.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageDirection.cs new file mode 100644 index 0000000000000..4fedf8acaf217 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageDirection.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Lineage direction. + public readonly partial struct LineageDirection : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LineageDirection(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InputValue = "INPUT"; + private const string OutputValue = "OUTPUT"; + private const string BothValue = "BOTH"; + + /// input. + public static LineageDirection Input { get; } = new LineageDirection(InputValue); + /// output. + public static LineageDirection Output { get; } = new LineageDirection(OutputValue); + /// both. + public static LineageDirection Both { get; } = new LineageDirection(BothValue); + /// Determines if two values are the same. + public static bool operator ==(LineageDirection left, LineageDirection right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LineageDirection left, LineageDirection right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator LineageDirection(string value) => new LineageDirection(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LineageDirection other && Equals(other); + /// + public bool Equals(LineageDirection other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageRelation.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageRelation.Serialization.cs new file mode 100644 index 0000000000000..6502cd2b3b5b4 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageRelation.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class LineageRelation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LineageRelation)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(FromEntityId)) + { + writer.WritePropertyName("fromEntityId"u8); + writer.WriteStringValue(FromEntityId); + } + if (Optional.IsDefined(RelationshipId)) + { + writer.WritePropertyName("relationshipId"u8); + writer.WriteStringValue(RelationshipId); + } + if (Optional.IsDefined(ToEntityId)) + { + writer.WritePropertyName("toEntityId"u8); + writer.WriteStringValue(ToEntityId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LineageRelation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LineageRelation)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLineageRelation(document.RootElement, options); + } + + internal static LineageRelation DeserializeLineageRelation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional fromEntityId = default; + Optional relationshipId = default; + Optional toEntityId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fromEntityId"u8)) + { + fromEntityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("relationshipId"u8)) + { + relationshipId = property.Value.GetString(); + continue; + } + if (property.NameEquals("toEntityId"u8)) + { + toEntityId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new LineageRelation(fromEntityId.Value, relationshipId.Value, toEntityId.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LineageRelation)} does not support '{options.Format}' format."); + } + } + + LineageRelation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLineageRelation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LineageRelation)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LineageRelation FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLineageRelation(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageRelation.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageRelation.cs new file mode 100644 index 0000000000000..412ed41ecbc48 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/LineageRelation.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The lineage relation with GUID of the from and to entity. + public partial class LineageRelation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal LineageRelation() + { + } + + /// Initializes a new instance of . + /// The GUID of from-entity. + /// The GUID of relationship. + /// The GUID of to-entity. + /// Keeps track of any properties unknown to the library. + internal LineageRelation(string fromEntityId, string relationshipId, string toEntityId, IDictionary serializedAdditionalRawData) + { + FromEntityId = fromEntityId; + RelationshipId = relationshipId; + ToEntityId = toEntityId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of from-entity. + public string FromEntityId { get; } + /// The GUID of relationship. + public string RelationshipId { get; } + /// The GUID of to-entity. + public string ToEntityId { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.Serialization.cs new file mode 100644 index 0000000000000..aaf54d025a3a4 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class MoveEntitiesConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MoveEntitiesConfig)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(EntityGuids)) + { + writer.WritePropertyName("entityGuids"u8); + writer.WriteStartArray(); + foreach (var item in EntityGuids) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + MoveEntitiesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MoveEntitiesConfig)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMoveEntitiesConfig(document.RootElement, options); + } + + internal static MoveEntitiesConfig DeserializeMoveEntitiesConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> entityGuids = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityGuids"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + entityGuids = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new MoveEntitiesConfig(Optional.ToList(entityGuids), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MoveEntitiesConfig)} does not support '{options.Format}' format."); + } + } + + MoveEntitiesConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMoveEntitiesConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MoveEntitiesConfig)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static MoveEntitiesConfig FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMoveEntitiesConfig(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.cs new file mode 100644 index 0000000000000..d38da199251cc --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// MoveEntitiesOptions. + public partial class MoveEntitiesConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MoveEntitiesConfig() + { + EntityGuids = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// An array of entity guids to be moved to target collection. + /// Keeps track of any properties unknown to the library. + internal MoveEntitiesConfig(IList entityGuids, IDictionary serializedAdditionalRawData) + { + EntityGuids = entityGuids; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An array of entity guids to be moved to target collection. + public IList EntityGuids { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ParentRelation.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ParentRelation.Serialization.cs new file mode 100644 index 0000000000000..9551c44e4da47 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ParentRelation.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class ParentRelation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ParentRelation)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ChildEntityId)) + { + writer.WritePropertyName("childEntityId"u8); + writer.WriteStringValue(ChildEntityId); + } + if (Optional.IsDefined(RelationshipId)) + { + writer.WritePropertyName("relationshipId"u8); + writer.WriteStringValue(RelationshipId); + } + if (Optional.IsDefined(ParentEntityId)) + { + writer.WritePropertyName("parentEntityId"u8); + writer.WriteStringValue(ParentEntityId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ParentRelation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ParentRelation)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeParentRelation(document.RootElement, options); + } + + internal static ParentRelation DeserializeParentRelation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional childEntityId = default; + Optional relationshipId = default; + Optional parentEntityId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("childEntityId"u8)) + { + childEntityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("relationshipId"u8)) + { + relationshipId = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentEntityId"u8)) + { + parentEntityId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ParentRelation(childEntityId.Value, relationshipId.Value, parentEntityId.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ParentRelation)} does not support '{options.Format}' format."); + } + } + + ParentRelation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeParentRelation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ParentRelation)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ParentRelation FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeParentRelation(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ParentRelation.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ParentRelation.cs new file mode 100644 index 0000000000000..db974366bcdf0 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ParentRelation.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The lineage parents relation with GUID of the parent entity and to child entity. + public partial class ParentRelation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ParentRelation() + { + } + + /// Initializes a new instance of . + /// The GUID of child entity. + /// The GUID of relationship. + /// The GUID of parent entity. + /// Keeps track of any properties unknown to the library. + internal ParentRelation(string childEntityId, string relationshipId, string parentEntityId, IDictionary serializedAdditionalRawData) + { + ChildEntityId = childEntityId; + RelationshipId = relationshipId; + ParentEntityId = parentEntityId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of child entity. + public string ChildEntityId { get; } + /// The GUID of relationship. + public string RelationshipId { get; } + /// The GUID of parent entity. + public string ParentEntityId { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/PurviewObjectId.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/PurviewObjectId.Serialization.cs new file mode 100644 index 0000000000000..8197de7e904fe --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/PurviewObjectId.Serialization.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class PurviewObjectId : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PurviewObjectId)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(TypeName)) + { + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + } + if (Optional.IsCollectionDefined(UniqueAttributes)) + { + writer.WritePropertyName("uniqueAttributes"u8); + writer.WriteStartObject(); + foreach (var item in UniqueAttributes) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(DisplayText)) + { + writer.WritePropertyName("displayText"u8); + writer.WriteStringValue(DisplayText); + } + if (Optional.IsDefined(ItemPath)) + { + writer.WritePropertyName("itemPath"u8); + writer.WriteStringValue(ItemPath); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PurviewObjectId IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PurviewObjectId)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePurviewObjectId(document.RootElement, options); + } + + internal static PurviewObjectId DeserializePurviewObjectId(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional guid = default; + Optional typeName = default; + Optional> uniqueAttributes = default; + Optional name = default; + Optional displayText = default; + Optional itemPath = default; + Optional resourceId = default; + Optional> properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("uniqueAttributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + uniqueAttributes = dictionary; + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayText"u8)) + { + displayText = property.Value.GetString(); + continue; + } + if (property.NameEquals("itemPath"u8)) + { + itemPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + properties = dictionary; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new PurviewObjectId(guid.Value, typeName.Value, Optional.ToDictionary(uniqueAttributes), name.Value, displayText.Value, itemPath.Value, resourceId.Value, Optional.ToDictionary(properties), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PurviewObjectId)} does not support '{options.Format}' format."); + } + } + + PurviewObjectId IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePurviewObjectId(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PurviewObjectId)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static PurviewObjectId FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePurviewObjectId(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/PurviewObjectId.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/PurviewObjectId.cs new file mode 100644 index 0000000000000..8cb7b5f1a570b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/PurviewObjectId.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// PurviewObjectId. + public partial class PurviewObjectId + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PurviewObjectId() + { + UniqueAttributes = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The GUID of the object. + /// The name of the type. + /// The unique attributes of the object. + /// Name. + /// Display text. + /// Item path. + /// Resource Id. + /// Dictionary of <any>. + /// Keeps track of any properties unknown to the library. + internal PurviewObjectId(string guid, string typeName, IDictionary uniqueAttributes, string name, string displayText, string itemPath, string resourceId, IDictionary properties, IDictionary serializedAdditionalRawData) + { + Guid = guid; + TypeName = typeName; + UniqueAttributes = uniqueAttributes; + Name = name; + DisplayText = displayText; + ItemPath = itemPath; + ResourceId = resourceId; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The GUID of the object. + public string Guid { get; set; } + /// The name of the type. + public string TypeName { get; set; } + /// + /// The unique attributes of the object. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary UniqueAttributes { get; } + /// Name. + public string Name { get; set; } + /// Display text. + public string DisplayText { get; set; } + /// Item path. + public string ItemPath { get; set; } + /// Resource Id. + public string ResourceId { get; set; } + /// + /// Dictionary of <any> + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary Properties { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.Serialization.cs new file mode 100644 index 0000000000000..f6f7fed75c75c --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.Serialization.cs @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class QueryConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QueryConfig)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Keywords)) + { + writer.WritePropertyName("keywords"u8); + writer.WriteStringValue(Keywords); + } + if (Optional.IsDefined(Limit)) + { + writer.WritePropertyName("limit"u8); + writer.WriteNumberValue(Limit.Value); + } + if (Optional.IsDefined(ContinuationToken)) + { + writer.WritePropertyName("continuationToken"u8); + writer.WriteStringValue(ContinuationToken); + } + if (Optional.IsCollectionDefined(Orderby)) + { + writer.WritePropertyName("orderby"u8); + writer.WriteStartArray(); + foreach (var item in Orderby) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item); +#else + using (JsonDocument document = JsonDocument.Parse(item)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Filter)) + { + writer.WritePropertyName("filter"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Filter); +#else + using (JsonDocument document = JsonDocument.Parse(Filter)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Facets)) + { + writer.WritePropertyName("facets"u8); + writer.WriteStartArray(); + foreach (var item in Facets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TaxonomySetting)) + { + writer.WritePropertyName("taxonomySetting"u8); + writer.WriteObjectValue(TaxonomySetting); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + QueryConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QueryConfig)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeQueryConfig(document.RootElement, options); + } + + internal static QueryConfig DeserializeQueryConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional keywords = default; + Optional limit = default; + Optional continuationToken = default; + Optional> orderby = default; + Optional filter = default; + Optional> facets = default; + Optional taxonomySetting = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keywords"u8)) + { + keywords = property.Value.GetString(); + continue; + } + if (property.NameEquals("limit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + limit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("continuationToken"u8)) + { + continuationToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("orderby"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(BinaryData.FromString(item.GetRawText())); + } + } + orderby = array; + continue; + } + if (property.NameEquals("filter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filter = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("facets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItem.DeserializeSearchFacetItem(item)); + } + facets = array; + continue; + } + if (property.NameEquals("taxonomySetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taxonomySetting = SearchTaxonomySetting.DeserializeSearchTaxonomySetting(property.Value); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new QueryConfig(keywords.Value, Optional.ToNullable(limit), continuationToken.Value, Optional.ToList(orderby), filter.Value, Optional.ToList(facets), taxonomySetting.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(QueryConfig)} does not support '{options.Format}' format."); + } + } + + QueryConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeQueryConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(QueryConfig)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static QueryConfig FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeQueryConfig(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.cs new file mode 100644 index 0000000000000..36c5c893adb00 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The search query of advanced search request. + public partial class QueryConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public QueryConfig() + { + Orderby = new ChangeTrackingList(); + Facets = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The keywords applied to all searchable fields. + /// + /// The limit of the number of the search result. default value is 50; maximum + /// value is 1000. + /// + /// + /// The token used to get next batch of data. Default 'Null' to get the first + /// batch, and will return new token in each response unless there's no more data. + /// + /// The sort order of search results, can specify multiple fields. + /// The filter for the search. See examples for the usage of supported filters. + /// The facets for search. See examples for the usage of supported facets. + /// The taxonomy setting for search. + /// Keeps track of any properties unknown to the library. + internal QueryConfig(string keywords, int? limit, string continuationToken, IList orderby, BinaryData filter, IList facets, SearchTaxonomySetting taxonomySetting, IDictionary serializedAdditionalRawData) + { + Keywords = keywords; + Limit = limit; + ContinuationToken = continuationToken; + Orderby = orderby; + Filter = filter; + Facets = facets; + TaxonomySetting = taxonomySetting; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The keywords applied to all searchable fields. + public string Keywords { get; set; } + /// + /// The limit of the number of the search result. default value is 50; maximum + /// value is 1000. + /// + public int? Limit { get; set; } + /// + /// The token used to get next batch of data. Default 'Null' to get the first + /// batch, and will return new token in each response unless there's no more data. + /// + public string ContinuationToken { get; set; } + /// + /// The sort order of search results, can specify multiple fields. + /// + /// To assign an object to the element of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IList Orderby { get; } + /// + /// The filter for the search. See examples for the usage of supported filters. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Filter { get; set; } + /// The facets for search. See examples for the usage of supported facets. + public IList Facets { get; } + /// The taxonomy setting for search. + public SearchTaxonomySetting TaxonomySetting { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryResult.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryResult.Serialization.cs new file mode 100644 index 0000000000000..9280a7d4ab1ea --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryResult.Serialization.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class QueryResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QueryResult)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(SearchCount)) + { + writer.WritePropertyName("@search.count"u8); + writer.WriteNumberValue(SearchCount.Value); + } + if (Optional.IsDefined(SearchCountApproximate)) + { + writer.WritePropertyName("@search.count.approximate"u8); + writer.WriteBooleanValue(SearchCountApproximate.Value); + } + if (Optional.IsDefined(ContinuationToken)) + { + writer.WritePropertyName("continuationToken"u8); + writer.WriteStringValue(ContinuationToken); + } + if (Optional.IsDefined(SearchFacets)) + { + writer.WritePropertyName("@search.facets"u8); + writer.WriteObjectValue(SearchFacets); + } + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + QueryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QueryResult)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeQueryResult(document.RootElement, options); + } + + internal static QueryResult DeserializeQueryResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional searchCount = default; + Optional searchCountApproximate = default; + Optional continuationToken = default; + Optional searchFacets = default; + Optional> value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("@search.count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + searchCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("@search.count.approximate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + searchCountApproximate = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("continuationToken"u8)) + { + continuationToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("@search.facets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + searchFacets = SearchFacetResultValue.DeserializeSearchFacetResultValue(property.Value); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchResultValue.DeserializeSearchResultValue(item)); + } + value = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new QueryResult(Optional.ToNullable(searchCount), Optional.ToNullable(searchCountApproximate), continuationToken.Value, searchFacets.Value, Optional.ToList(value), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(QueryResult)} does not support '{options.Format}' format."); + } + } + + QueryResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeQueryResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(QueryResult)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static QueryResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeQueryResult(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryResult.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryResult.cs new file mode 100644 index 0000000000000..e2712ad668aaf --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryResult.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The result of the search result. + public partial class QueryResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal QueryResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The total number of search results (not the number of documents in a single + /// page). + /// + /// 'True' if the '@search.count' is an approximate value and vise versa. + /// The token used to get next batch of data. Absent if there's no more data. + /// + /// A facet list that consists of index fields assetType ,classification, + /// contactId, and label. When the facet is specified in the request, the value of + /// the facet is returned as an element of @search.facets. + /// + /// Search result value. + /// Keeps track of any properties unknown to the library. + internal QueryResult(int? searchCount, bool? searchCountApproximate, string continuationToken, SearchFacetResultValue searchFacets, IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + SearchCount = searchCount; + SearchCountApproximate = searchCountApproximate; + ContinuationToken = continuationToken; + SearchFacets = searchFacets; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The total number of search results (not the number of documents in a single + /// page). + /// + public int? SearchCount { get; } + /// 'True' if the '@search.count' is an approximate value and vise versa. + public bool? SearchCountApproximate { get; } + /// The token used to get next batch of data. Absent if there's no more data. + public string ContinuationToken { get; } + /// + /// A facet list that consists of index fields assetType ,classification, + /// contactId, and label. When the facet is specified in the request, the value of + /// the facet is returned as an element of @search.facets. + /// + public SearchFacetResultValue SearchFacets { get; } + /// Search result value. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs new file mode 100644 index 0000000000000..ba52467fd8852 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Purview.DataMap +{ + // Data plane generated sub-client. + /// The Relationship sub-client. + public partial class Relationship + { + private static readonly string[] AuthorizationScopes = new string[] { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of Relationship for mocking. + protected Relationship() + { + } + + /// Initializes a new instance of Relationship. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// The to use. + internal Relationship(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + } + + /// Create a new relationship between entities. + /// Atlas relationship instance. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> CreateAsync(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasRelationship.ToRequestContent(); + Response response = await CreateAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AtlasRelationship.FromResponse(response), response); + } + + /// Create a new relationship between entities. + /// Atlas relationship instance. + /// The cancellation token to use. + /// is null. + /// + public virtual Response Create(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasRelationship.ToRequestContent(); + Response response = Create(content, context); + return Response.FromValue(AtlasRelationship.FromResponse(response), response); + } + + /// + /// [Protocol Method] Create a new relationship between entities. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Relationship.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a new relationship between entities. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Create(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Relationship.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update an existing relationship between entities. + /// Atlas relationship instance. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> UpdateAsync(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasRelationship.ToRequestContent(); + Response response = await UpdateAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AtlasRelationship.FromResponse(response), response); + } + + /// Update an existing relationship between entities. + /// Atlas relationship instance. + /// The cancellation token to use. + /// is null. + /// + public virtual Response Update(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasRelationship.ToRequestContent(); + Response response = Update(content, context); + return Response.FromValue(AtlasRelationship.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update an existing relationship between entities. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Relationship.Update"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update an existing relationship between entities. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Update(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Relationship.Update"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get relationship information between entities by its GUID. + /// The globally unique identifier of the relationship. + /// Limits whether includes extended information. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetRelationshipAsync(string guid, bool? extendedInfo = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetRelationshipAsync(guid, extendedInfo, context).ConfigureAwait(false); + return Response.FromValue(AtlasRelationshipWithExtInfo.FromResponse(response), response); + } + + /// Get relationship information between entities by its GUID. + /// The globally unique identifier of the relationship. + /// Limits whether includes extended information. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetRelationship(string guid, bool? extendedInfo = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetRelationship(guid, extendedInfo, context); + return Response.FromValue(AtlasRelationshipWithExtInfo.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get relationship information between entities by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the relationship. + /// Limits whether includes extended information. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetRelationshipAsync(string guid, bool? extendedInfo, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Relationship.GetRelationship"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelationshipRequest(guid, extendedInfo, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get relationship information between entities by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the relationship. + /// Limits whether includes extended information. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetRelationship(string guid, bool? extendedInfo, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Relationship.GetRelationship"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelationshipRequest(guid, extendedInfo, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a relationship between entities by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier of the relationship. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteAsync(string guid, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Relationship.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a relationship between entities by its GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The globally unique identifier of the relationship. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Delete(string guid, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("Relationship.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateCreateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/relationship", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateUpdateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/relationship", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetRelationshipRequest(string guid, bool? extendedInfo, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/relationship/guid/", false); + uri.AppendPath(guid, true); + if (extendedInfo != null) + { + uri.AppendQuery("extendedInfo", extendedInfo.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/relationship/guid/", false); + uri.AppendPath(guid, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/RelationshipCategory.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/RelationshipCategory.cs new file mode 100644 index 0000000000000..5d1c2f363679a --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/RelationshipCategory.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Relationship Category. + public readonly partial struct RelationshipCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RelationshipCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AssociationValue = "ASSOCIATION"; + private const string AggregationValue = "AGGREGATION"; + private const string CompositionValue = "COMPOSITION"; + + /// association. + public static RelationshipCategory Association { get; } = new RelationshipCategory(AssociationValue); + /// aggregation. + public static RelationshipCategory Aggregation { get; } = new RelationshipCategory(AggregationValue); + /// composition. + public static RelationshipCategory Composition { get; } = new RelationshipCategory(CompositionValue); + /// Determines if two values are the same. + public static bool operator ==(RelationshipCategory left, RelationshipCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RelationshipCategory left, RelationshipCategory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RelationshipCategory(string value) => new RelationshipCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RelationshipCategory other && Equals(other); + /// + public bool Equals(RelationshipCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ResourceLink.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ResourceLink.Serialization.cs new file mode 100644 index 0000000000000..0ff50f9a0898b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ResourceLink.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class ResourceLink : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceLink)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResourceLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceLink)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceLink(document.RootElement, options); + } + + internal static ResourceLink DeserializeResourceLink(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional displayName = default; + Optional url = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ResourceLink(displayName.Value, url.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResourceLink)} does not support '{options.Format}' format."); + } + } + + ResourceLink IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResourceLink(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceLink)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ResourceLink FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResourceLink(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ResourceLink.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ResourceLink.cs new file mode 100644 index 0000000000000..a99aed57db919 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ResourceLink.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// ResourceLink. + public partial class ResourceLink + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceLink() + { + } + + /// Initializes a new instance of . + /// Display name for url. + /// web url. http or https. + /// Keeps track of any properties unknown to the library. + internal ResourceLink(string displayName, string url, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + Url = url; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Display name for url. + public string DisplayName { get; set; } + /// web url. http or https. + public string Url { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/RoundingMode.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/RoundingMode.cs new file mode 100644 index 0000000000000..e5e7ca207e40d --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/RoundingMode.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Rounding Mode. + public readonly partial struct RoundingMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RoundingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UpValue = "UP"; + private const string DownValue = "DOWN"; + private const string CeilingValue = "CEILING"; + private const string FloorValue = "FLOOR"; + private const string HalfUpValue = "HALF_UP"; + private const string HalfDownValue = "HALF_DOWN"; + private const string HalfEvenValue = "HALF_EVEN"; + private const string UnnecessaryValue = "UNNECESSARY"; + + /// up. + public static RoundingMode Up { get; } = new RoundingMode(UpValue); + /// down. + public static RoundingMode Down { get; } = new RoundingMode(DownValue); + /// ceiling. + public static RoundingMode Ceiling { get; } = new RoundingMode(CeilingValue); + /// floor. + public static RoundingMode Floor { get; } = new RoundingMode(FloorValue); + /// half up. + public static RoundingMode HalfUp { get; } = new RoundingMode(HalfUpValue); + /// half down. + public static RoundingMode HalfDown { get; } = new RoundingMode(HalfDownValue); + /// half even. + public static RoundingMode HalfEven { get; } = new RoundingMode(HalfEvenValue); + /// unnecessary. + public static RoundingMode Unnecessary { get; } = new RoundingMode(UnnecessaryValue); + /// Determines if two values are the same. + public static bool operator ==(RoundingMode left, RoundingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RoundingMode left, RoundingMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RoundingMode(string value) => new RoundingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoundingMode other && Equals(other); + /// + public bool Equals(RoundingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItem.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItem.Serialization.cs new file mode 100644 index 0000000000000..b5ab0c2f746ee --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItem.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SearchFacetItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchFacetItem)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(Facet)) + { + writer.WritePropertyName("facet"u8); + writer.WriteStringValue(Facet); + } + if (Optional.IsDefined(Sort)) + { + writer.WritePropertyName("sort"u8); + writer.WriteObjectValue(Sort); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SearchFacetItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchFacetItem)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSearchFacetItem(document.RootElement, options); + } + + internal static SearchFacetItem DeserializeSearchFacetItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional count = default; + Optional facet = default; + Optional sort = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("facet"u8)) + { + facet = property.Value.GetString(); + continue; + } + if (property.NameEquals("sort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sort = SearchFacetSort.DeserializeSearchFacetSort(property.Value); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SearchFacetItem(Optional.ToNullable(count), facet.Value, sort.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SearchFacetItem)} does not support '{options.Format}' format."); + } + } + + SearchFacetItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSearchFacetItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SearchFacetItem)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SearchFacetItem FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSearchFacetItem(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItem.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItem.cs new file mode 100644 index 0000000000000..2cd438f9479ab --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItem.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The content of a search facet result item. + public partial class SearchFacetItem + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SearchFacetItem() + { + } + + /// Initializes a new instance of . + /// The count of the facet item. + /// The name of the facet item. + /// Define the sorting criteria for items. + /// Keeps track of any properties unknown to the library. + internal SearchFacetItem(int? count, string facet, SearchFacetSort sort, IDictionary serializedAdditionalRawData) + { + Count = count; + Facet = facet; + Sort = sort; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The count of the facet item. + public int? Count { get; set; } + /// The name of the facet item. + public string Facet { get; set; } + /// Define the sorting criteria for items. + public SearchFacetSort Sort { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItemValue.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItemValue.Serialization.cs new file mode 100644 index 0000000000000..eb7b42883bdf7 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItemValue.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SearchFacetItemValue : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchFacetItemValue)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SearchFacetItemValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchFacetItemValue)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSearchFacetItemValue(document.RootElement, options); + } + + internal static SearchFacetItemValue DeserializeSearchFacetItemValue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional count = default; + Optional value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SearchFacetItemValue(Optional.ToNullable(count), value.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SearchFacetItemValue)} does not support '{options.Format}' format."); + } + } + + SearchFacetItemValue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSearchFacetItemValue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SearchFacetItemValue)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SearchFacetItemValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSearchFacetItemValue(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItemValue.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItemValue.cs new file mode 100644 index 0000000000000..75070e4c5ec50 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetItemValue.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The content of a search facet result item. + public partial class SearchFacetItemValue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SearchFacetItemValue() + { + } + + /// Initializes a new instance of . + /// The count of the facet item. + /// The name of the facet item. + /// Keeps track of any properties unknown to the library. + internal SearchFacetItemValue(int? count, string value, IDictionary serializedAdditionalRawData) + { + Count = count; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The count of the facet item. + public int? Count { get; } + /// The name of the facet item. + public string Value { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetResultValue.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetResultValue.Serialization.cs new file mode 100644 index 0000000000000..9d9135a4fb4b7 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetResultValue.Serialization.cs @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SearchFacetResultValue : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchFacetResultValue)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(EntityType)) + { + writer.WritePropertyName("entityType"u8); + writer.WriteStartArray(); + foreach (var item in EntityType) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AssetType)) + { + writer.WritePropertyName("assetType"u8); + writer.WriteStartArray(); + foreach (var item in AssetType) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Classification)) + { + writer.WritePropertyName("classification"u8); + writer.WriteStartArray(); + foreach (var item in Classification) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Term)) + { + writer.WritePropertyName("term"u8); + writer.WriteStartArray(); + foreach (var item in Term) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ContactId)) + { + writer.WritePropertyName("contactId"u8); + writer.WriteStartArray(); + foreach (var item in ContactId) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ContactType)) + { + writer.WritePropertyName("contactType"u8); + writer.WriteStartArray(); + foreach (var item in ContactType) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Label)) + { + writer.WritePropertyName("label"u8); + writer.WriteStartArray(); + foreach (var item in Label) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(GlossaryType)) + { + writer.WritePropertyName("glossaryType"u8); + writer.WriteStartArray(); + foreach (var item in GlossaryType) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(TermStatus)) + { + writer.WritePropertyName("termStatus"u8); + writer.WriteStartArray(); + foreach (var item in TermStatus) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(TermTemplate)) + { + writer.WritePropertyName("termTemplate"u8); + writer.WriteStartArray(); + foreach (var item in TermTemplate) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SearchFacetResultValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchFacetResultValue)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSearchFacetResultValue(document.RootElement, options); + } + + internal static SearchFacetResultValue DeserializeSearchFacetResultValue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> entityType = default; + Optional> assetType = default; + Optional> classification = default; + Optional> term = default; + Optional> contactId = default; + Optional> contactType = default; + Optional> label = default; + Optional> glossaryType = default; + Optional> termStatus = default; + Optional> termTemplate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + entityType = array; + continue; + } + if (property.NameEquals("assetType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + assetType = array; + continue; + } + if (property.NameEquals("classification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + classification = array; + continue; + } + if (property.NameEquals("term"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + term = array; + continue; + } + if (property.NameEquals("contactId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + contactId = array; + continue; + } + if (property.NameEquals("contactType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + contactType = array; + continue; + } + if (property.NameEquals("label"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + label = array; + continue; + } + if (property.NameEquals("glossaryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + glossaryType = array; + continue; + } + if (property.NameEquals("termStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + termStatus = array; + continue; + } + if (property.NameEquals("termTemplate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchFacetItemValue.DeserializeSearchFacetItemValue(item)); + } + termTemplate = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SearchFacetResultValue(Optional.ToList(entityType), Optional.ToList(assetType), Optional.ToList(classification), Optional.ToList(term), Optional.ToList(contactId), Optional.ToList(contactType), Optional.ToList(label), Optional.ToList(glossaryType), Optional.ToList(termStatus), Optional.ToList(termTemplate), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SearchFacetResultValue)} does not support '{options.Format}' format."); + } + } + + SearchFacetResultValue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSearchFacetResultValue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SearchFacetResultValue)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SearchFacetResultValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSearchFacetResultValue(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetResultValue.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetResultValue.cs new file mode 100644 index 0000000000000..4ae493aac888e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetResultValue.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// A facet list that consists of index fields assetType ,classification, + /// contactId, and label. When the facet is specified in the request, the value of + /// the facet is returned as an element of @search.facets. + /// + public partial class SearchFacetResultValue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SearchFacetResultValue() + { + EntityType = new ChangeTrackingList(); + AssetType = new ChangeTrackingList(); + Classification = new ChangeTrackingList(); + Term = new ChangeTrackingList(); + ContactId = new ChangeTrackingList(); + ContactType = new ChangeTrackingList(); + Label = new ChangeTrackingList(); + GlossaryType = new ChangeTrackingList(); + TermStatus = new ChangeTrackingList(); + TermTemplate = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Entity type. + /// Asset type. + /// Classification. + /// Term. + /// Contact id. + /// Contact type. + /// Label. + /// Glossary type. + /// Term status. + /// Term template. + /// Keeps track of any properties unknown to the library. + internal SearchFacetResultValue(IReadOnlyList entityType, IReadOnlyList assetType, IReadOnlyList classification, IReadOnlyList term, IReadOnlyList contactId, IReadOnlyList contactType, IReadOnlyList label, IReadOnlyList glossaryType, IReadOnlyList termStatus, IReadOnlyList termTemplate, IDictionary serializedAdditionalRawData) + { + EntityType = entityType; + AssetType = assetType; + Classification = classification; + Term = term; + ContactId = contactId; + ContactType = contactType; + Label = label; + GlossaryType = glossaryType; + TermStatus = termStatus; + TermTemplate = termTemplate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Entity type. + public IReadOnlyList EntityType { get; } + /// Asset type. + public IReadOnlyList AssetType { get; } + /// Classification. + public IReadOnlyList Classification { get; } + /// Term. + public IReadOnlyList Term { get; } + /// Contact id. + public IReadOnlyList ContactId { get; } + /// Contact type. + public IReadOnlyList ContactType { get; } + /// Label. + public IReadOnlyList Label { get; } + /// Glossary type. + public IReadOnlyList GlossaryType { get; } + /// Term status. + public IReadOnlyList TermStatus { get; } + /// Term template. + public IReadOnlyList TermTemplate { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetSort.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetSort.Serialization.cs new file mode 100644 index 0000000000000..00b307b4e3def --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetSort.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SearchFacetSort : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchFacetSort)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteStringValue(Count.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SearchFacetSort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchFacetSort)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSearchFacetSort(document.RootElement, options); + } + + internal static SearchFacetSort DeserializeSearchFacetSort(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional count = default; + Optional value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = new SearchSortOrder(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = new SearchSortOrder(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SearchFacetSort(Optional.ToNullable(count), Optional.ToNullable(value), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SearchFacetSort)} does not support '{options.Format}' format."); + } + } + + SearchFacetSort IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSearchFacetSort(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SearchFacetSort)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SearchFacetSort FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSearchFacetSort(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetSort.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetSort.cs new file mode 100644 index 0000000000000..b6fa57ed5c5f3 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchFacetSort.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The sorting criteria. + public partial class SearchFacetSort + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SearchFacetSort() + { + } + + /// Initializes a new instance of . + /// Order by count. + /// Order by value. + /// Keeps track of any properties unknown to the library. + internal SearchFacetSort(SearchSortOrder? count, SearchSortOrder? value, IDictionary serializedAdditionalRawData) + { + Count = count; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Order by count. + public SearchSortOrder? Count { get; set; } + /// Order by value. + public SearchSortOrder? Value { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchHighlights.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchHighlights.Serialization.cs new file mode 100644 index 0000000000000..2f2658f2b28dd --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchHighlights.Serialization.cs @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SearchHighlights : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchHighlights)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStartArray(); + foreach (var item in Id) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(QualifiedName)) + { + writer.WritePropertyName("qualifiedName"u8); + writer.WriteStartArray(); + foreach (var item in QualifiedName) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStartArray(); + foreach (var item in Name) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStartArray(); + foreach (var item in Description) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EntityType)) + { + writer.WritePropertyName("entityType"u8); + writer.WriteStartArray(); + foreach (var item in EntityType) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SearchHighlights IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchHighlights)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSearchHighlights(document.RootElement, options); + } + + internal static SearchHighlights DeserializeSearchHighlights(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> id = default; + Optional> qualifiedName = default; + Optional> name = default; + Optional> description = default; + Optional> entityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + id = array; + continue; + } + if (property.NameEquals("qualifiedName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + qualifiedName = array; + continue; + } + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + name = array; + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + description = array; + continue; + } + if (property.NameEquals("entityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + entityType = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SearchHighlights(Optional.ToList(id), Optional.ToList(qualifiedName), Optional.ToList(name), Optional.ToList(description), Optional.ToList(entityType), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SearchHighlights)} does not support '{options.Format}' format."); + } + } + + SearchHighlights IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSearchHighlights(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SearchHighlights)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SearchHighlights FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSearchHighlights(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchHighlights.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchHighlights.cs new file mode 100644 index 0000000000000..41a2c32c7737b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchHighlights.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// + /// A highlight list that consists of index fields id ,qualifiedName, name, + /// description, entityType. When the keyword appears in those fields, the value of + /// the field, attached with emphasis mark, is returned as an element of + /// @search.highlights. + /// + public partial class SearchHighlights + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SearchHighlights() + { + Id = new ChangeTrackingList(); + QualifiedName = new ChangeTrackingList(); + Name = new ChangeTrackingList(); + Description = new ChangeTrackingList(); + EntityType = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Id. + /// Qualified name. + /// Name. + /// Description. + /// Entity type. + /// Keeps track of any properties unknown to the library. + internal SearchHighlights(IReadOnlyList id, IReadOnlyList qualifiedName, IReadOnlyList name, IReadOnlyList description, IReadOnlyList entityType, IDictionary serializedAdditionalRawData) + { + Id = id; + QualifiedName = qualifiedName; + Name = name; + Description = description; + EntityType = entityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Id. + public IReadOnlyList Id { get; } + /// Qualified name. + public IReadOnlyList QualifiedName { get; } + /// Name. + public IReadOnlyList Name { get; } + /// Description. + public IReadOnlyList Description { get; } + /// Entity type. + public IReadOnlyList EntityType { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchResultValue.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchResultValue.Serialization.cs new file mode 100644 index 0000000000000..30379475398d8 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchResultValue.Serialization.cs @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SearchResultValue : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchResultValue)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(SearchScore)) + { + writer.WritePropertyName("@search.score"u8); + writer.WriteNumberValue(SearchScore.Value); + } + if (Optional.IsDefined(SearchHighlights)) + { + writer.WritePropertyName("@search.highlights"u8); + writer.WriteObjectValue(SearchHighlights); + } + if (Optional.IsDefined(ObjectType)) + { + writer.WritePropertyName("objectType"u8); + writer.WriteStringValue(ObjectType); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(QualifiedName)) + { + writer.WritePropertyName("qualifiedName"u8); + writer.WriteStringValue(QualifiedName); + } + if (Optional.IsDefined(EntityType)) + { + writer.WritePropertyName("entityType"u8); + writer.WriteStringValue(EntityType); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Endorsement)) + { + writer.WritePropertyName("endorsement"u8); + writer.WriteStringValue(Endorsement); + } + if (Optional.IsDefined(Owner)) + { + writer.WritePropertyName("owner"u8); + writer.WriteStringValue(Owner); + } + if (Optional.IsCollectionDefined(Classification)) + { + writer.WritePropertyName("classification"u8); + writer.WriteStartArray(); + foreach (var item in Classification) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Label)) + { + writer.WritePropertyName("label"u8); + writer.WriteStartArray(); + foreach (var item in Label) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Term)) + { + writer.WritePropertyName("term"u8); + writer.WriteStartArray(); + foreach (var item in Term) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Contact)) + { + writer.WritePropertyName("contact"u8); + writer.WriteStartArray(); + foreach (var item in Contact) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AssetType)) + { + writer.WritePropertyName("assetType"u8); + writer.WriteStartArray(); + foreach (var item in AssetType) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(GlossaryType)) + { + writer.WritePropertyName("glossaryType"u8); + writer.WriteStringValue(GlossaryType); + } + if (Optional.IsDefined(Glossary)) + { + writer.WritePropertyName("glossary"u8); + writer.WriteStringValue(Glossary); + } + if (Optional.IsDefined(TermStatus)) + { + writer.WritePropertyName("termStatus"u8); + writer.WriteStringValue(TermStatus); + } + if (Optional.IsCollectionDefined(TermTemplate)) + { + writer.WritePropertyName("termTemplate"u8); + writer.WriteStartArray(); + foreach (var item in TermTemplate) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LongDescription)) + { + writer.WritePropertyName("longDescription"u8); + writer.WriteStringValue(LongDescription); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SearchResultValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchResultValue)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSearchResultValue(document.RootElement, options); + } + + internal static SearchResultValue DeserializeSearchResultValue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional searchScore = default; + Optional searchHighlights = default; + Optional objectType = default; + Optional createTime = default; + Optional updateTime = default; + Optional id = default; + Optional name = default; + Optional qualifiedName = default; + Optional entityType = default; + Optional description = default; + Optional endorsement = default; + Optional owner = default; + Optional> classification = default; + Optional> label = default; + Optional> term = default; + Optional> contact = default; + Optional> assetType = default; + Optional glossaryType = default; + Optional glossary = default; + Optional termStatus = default; + Optional> termTemplate = default; + Optional longDescription = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("@search.score"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + searchScore = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("@search.highlights"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + searchHighlights = SearchHighlights.DeserializeSearchHighlights(property.Value); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("qualifiedName"u8)) + { + qualifiedName = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityType"u8)) + { + entityType = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("endorsement"u8)) + { + endorsement = property.Value.GetString(); + continue; + } + if (property.NameEquals("owner"u8)) + { + owner = property.Value.GetString(); + continue; + } + if (property.NameEquals("classification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + classification = array; + continue; + } + if (property.NameEquals("label"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + label = array; + continue; + } + if (property.NameEquals("term"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TermSearchResultValue.DeserializeTermSearchResultValue(item)); + } + term = array; + continue; + } + if (property.NameEquals("contact"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContactSearchResultValue.DeserializeContactSearchResultValue(item)); + } + contact = array; + continue; + } + if (property.NameEquals("assetType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assetType = array; + continue; + } + if (property.NameEquals("glossaryType"u8)) + { + glossaryType = property.Value.GetString(); + continue; + } + if (property.NameEquals("glossary"u8)) + { + glossary = property.Value.GetString(); + continue; + } + if (property.NameEquals("termStatus"u8)) + { + termStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("termTemplate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + termTemplate = array; + continue; + } + if (property.NameEquals("longDescription"u8)) + { + longDescription = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SearchResultValue(Optional.ToNullable(searchScore), searchHighlights.Value, objectType.Value, Optional.ToNullable(createTime), Optional.ToNullable(updateTime), id.Value, name.Value, qualifiedName.Value, entityType.Value, description.Value, endorsement.Value, owner.Value, Optional.ToList(classification), Optional.ToList(label), Optional.ToList(term), Optional.ToList(contact), Optional.ToList(assetType), glossaryType.Value, glossary.Value, termStatus.Value, Optional.ToList(termTemplate), longDescription.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SearchResultValue)} does not support '{options.Format}' format."); + } + } + + SearchResultValue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSearchResultValue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SearchResultValue)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SearchResultValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSearchResultValue(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchResultValue.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchResultValue.cs new file mode 100644 index 0000000000000..224c16fa4077d --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchResultValue.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The value item of the search result. + public partial class SearchResultValue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SearchResultValue() + { + Classification = new ChangeTrackingList(); + Label = new ChangeTrackingList(); + Term = new ChangeTrackingList(); + Contact = new ChangeTrackingList(); + AssetType = new ChangeTrackingList(); + TermTemplate = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The search score calculated by the search engine. The results are ordered by + /// search score by default. + /// + /// + /// A highlight list that consists of index fields id ,qualifiedName, name, + /// description, entityType. When the keyword appears in those fields, the value of + /// the field, attached with emphasis mark, is returned as an element of + /// @search.highlights. + /// + /// + /// The object type of the record. Object type is the top-level property to + /// distinguish whether a record is an asset or a term. + /// + /// The create time of the record. The Unix epoch format. + /// The last update time of the record. The Unix epoch format. + /// The GUID of the record. + /// The name of the record. + /// The qualified name of the record. + /// The type name of the asset. + /// The description of the asset. + /// The endorsement of the asset. + /// The owner of the record. + /// The classifications of the record. + /// The labels of the asset. + /// The terms assigned to the asset. + /// The contacts of the asset. + /// The asset types of the asset. + /// + /// The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or + /// AtlasGlossaryCategory. + /// + /// The glossary name of the term. + /// The status of the term. + /// The term template names used by the term. + /// The definition of the term. + /// Keeps track of any properties unknown to the library. + internal SearchResultValue(float? searchScore, SearchHighlights searchHighlights, string objectType, long? createTime, long? updateTime, string id, string name, string qualifiedName, string entityType, string description, string endorsement, string owner, IReadOnlyList classification, IReadOnlyList label, IReadOnlyList term, IReadOnlyList contact, IReadOnlyList assetType, string glossaryType, string glossary, string termStatus, IReadOnlyList termTemplate, string longDescription, IDictionary serializedAdditionalRawData) + { + SearchScore = searchScore; + SearchHighlights = searchHighlights; + ObjectType = objectType; + CreateTime = createTime; + UpdateTime = updateTime; + Id = id; + Name = name; + QualifiedName = qualifiedName; + EntityType = entityType; + Description = description; + Endorsement = endorsement; + Owner = owner; + Classification = classification; + Label = label; + Term = term; + Contact = contact; + AssetType = assetType; + GlossaryType = glossaryType; + Glossary = glossary; + TermStatus = termStatus; + TermTemplate = termTemplate; + LongDescription = longDescription; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The search score calculated by the search engine. The results are ordered by + /// search score by default. + /// + public float? SearchScore { get; } + /// + /// A highlight list that consists of index fields id ,qualifiedName, name, + /// description, entityType. When the keyword appears in those fields, the value of + /// the field, attached with emphasis mark, is returned as an element of + /// @search.highlights. + /// + public SearchHighlights SearchHighlights { get; } + /// + /// The object type of the record. Object type is the top-level property to + /// distinguish whether a record is an asset or a term. + /// + public string ObjectType { get; } + /// The create time of the record. The Unix epoch format. + public long? CreateTime { get; } + /// The last update time of the record. The Unix epoch format. + public long? UpdateTime { get; } + /// The GUID of the record. + public string Id { get; } + /// The name of the record. + public string Name { get; } + /// The qualified name of the record. + public string QualifiedName { get; } + /// The type name of the asset. + public string EntityType { get; } + /// The description of the asset. + public string Description { get; } + /// The endorsement of the asset. + public string Endorsement { get; } + /// The owner of the record. + public string Owner { get; } + /// The classifications of the record. + public IReadOnlyList Classification { get; } + /// The labels of the asset. + public IReadOnlyList Label { get; } + /// The terms assigned to the asset. + public IReadOnlyList Term { get; } + /// The contacts of the asset. + public IReadOnlyList Contact { get; } + /// The asset types of the asset. + public IReadOnlyList AssetType { get; } + /// + /// The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or + /// AtlasGlossaryCategory. + /// + public string GlossaryType { get; } + /// The glossary name of the term. + public string Glossary { get; } + /// The status of the term. + public string TermStatus { get; } + /// The term template names used by the term. + public IReadOnlyList TermTemplate { get; } + /// The definition of the term. + public string LongDescription { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchSortOrder.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchSortOrder.cs new file mode 100644 index 0000000000000..40f55c2030e9b --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchSortOrder.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Search sort order. + public readonly partial struct SearchSortOrder : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SearchSortOrder(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AscendValue = "asc"; + private const string DescendValue = "desc"; + + /// Use ascending order for sorting. + public static SearchSortOrder Ascend { get; } = new SearchSortOrder(AscendValue); + /// Use descending order for sorting. + public static SearchSortOrder Descend { get; } = new SearchSortOrder(DescendValue); + /// Determines if two values are the same. + public static bool operator ==(SearchSortOrder left, SearchSortOrder right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SearchSortOrder left, SearchSortOrder right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SearchSortOrder(string value) => new SearchSortOrder(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SearchSortOrder other && Equals(other); + /// + public bool Equals(SearchSortOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchTaxonomySetting.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchTaxonomySetting.Serialization.cs new file mode 100644 index 0000000000000..ba43877ba516d --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchTaxonomySetting.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SearchTaxonomySetting : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchTaxonomySetting)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AssetTypes)) + { + writer.WritePropertyName("assetTypes"u8); + writer.WriteStartArray(); + foreach (var item in AssetTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Facet)) + { + writer.WritePropertyName("facet"u8); + writer.WriteObjectValue(Facet); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SearchTaxonomySetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SearchTaxonomySetting)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSearchTaxonomySetting(document.RootElement, options); + } + + internal static SearchTaxonomySetting DeserializeSearchTaxonomySetting(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> assetTypes = default; + Optional facet = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assetTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assetTypes = array; + continue; + } + if (property.NameEquals("facet"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + facet = SearchFacetItem.DeserializeSearchFacetItem(property.Value); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SearchTaxonomySetting(Optional.ToList(assetTypes), facet.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SearchTaxonomySetting)} does not support '{options.Format}' format."); + } + } + + SearchTaxonomySetting IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSearchTaxonomySetting(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SearchTaxonomySetting)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SearchTaxonomySetting FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSearchTaxonomySetting(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchTaxonomySetting.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchTaxonomySetting.cs new file mode 100644 index 0000000000000..db15f34a893dd --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SearchTaxonomySetting.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Taxonomy setting for search request. + public partial class SearchTaxonomySetting + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SearchTaxonomySetting() + { + AssetTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Asset types. + /// The content of a search facet result item. + /// Keeps track of any properties unknown to the library. + internal SearchTaxonomySetting(IList assetTypes, SearchFacetItem facet, IDictionary serializedAdditionalRawData) + { + AssetTypes = assetTypes; + Facet = facet; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Asset types. + public IList AssetTypes { get; } + /// The content of a search facet result item. + public SearchFacetItem Facet { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/StatusAtlasRelationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/StatusAtlasRelationship.cs new file mode 100644 index 0000000000000..48e238befa2f3 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/StatusAtlasRelationship.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Status for atlas relationship. + public readonly partial struct StatusAtlasRelationship : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StatusAtlasRelationship(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "ACTIVE"; + private const string DeletedValue = "DELETED"; + + /// active. + public static StatusAtlasRelationship Active { get; } = new StatusAtlasRelationship(ActiveValue); + /// deleted. + public static StatusAtlasRelationship Deleted { get; } = new StatusAtlasRelationship(DeletedValue); + /// Determines if two values are the same. + public static bool operator ==(StatusAtlasRelationship left, StatusAtlasRelationship right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StatusAtlasRelationship left, StatusAtlasRelationship right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StatusAtlasRelationship(string value) => new StatusAtlasRelationship(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StatusAtlasRelationship other && Equals(other); + /// + public bool Equals(StatusAtlasRelationship other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.Serialization.cs new file mode 100644 index 0000000000000..bff021ad7d947 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SuggestConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SuggestConfig)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Keywords)) + { + writer.WritePropertyName("keywords"u8); + writer.WriteStringValue(Keywords); + } + if (Optional.IsDefined(Limit)) + { + writer.WritePropertyName("limit"u8); + writer.WriteNumberValue(Limit.Value); + } + if (Optional.IsDefined(Filter)) + { + writer.WritePropertyName("filter"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Filter); +#else + using (JsonDocument document = JsonDocument.Parse(Filter)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SuggestConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SuggestConfig)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSuggestConfig(document.RootElement, options); + } + + internal static SuggestConfig DeserializeSuggestConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional keywords = default; + Optional limit = default; + Optional filter = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keywords"u8)) + { + keywords = property.Value.GetString(); + continue; + } + if (property.NameEquals("limit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + limit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("filter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filter = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SuggestConfig(keywords.Value, Optional.ToNullable(limit), filter.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SuggestConfig)} does not support '{options.Format}' format."); + } + } + + SuggestConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSuggestConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SuggestConfig)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SuggestConfig FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSuggestConfig(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.cs new file mode 100644 index 0000000000000..e7460baf7ba85 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The payload of suggest request. + public partial class SuggestConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SuggestConfig() + { + } + + /// Initializes a new instance of . + /// + /// The keywords applied to all fields that support suggest operation. It must be + /// at least 1 character, and no more than 100 characters. In the index schema we + /// defined a default suggester which lists all the supported fields and specifies + /// a search mode. + /// + /// + /// The number of suggestions we hope to return. The default value is 5. The value + /// must be a number between 1 and 100. + /// + /// The filter for the search. + /// Keeps track of any properties unknown to the library. + internal SuggestConfig(string keywords, int? limit, BinaryData filter, IDictionary serializedAdditionalRawData) + { + Keywords = keywords; + Limit = limit; + Filter = filter; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The keywords applied to all fields that support suggest operation. It must be + /// at least 1 character, and no more than 100 characters. In the index schema we + /// defined a default suggester which lists all the supported fields and specifies + /// a search mode. + /// + public string Keywords { get; set; } + /// + /// The number of suggestions we hope to return. The default value is 5. The value + /// must be a number between 1 and 100. + /// + public int? Limit { get; set; } + /// + /// The filter for the search. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Filter { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResult.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResult.Serialization.cs new file mode 100644 index 0000000000000..3bb0d613d2341 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResult.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SuggestResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SuggestResult)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SuggestResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SuggestResult)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSuggestResult(document.RootElement, options); + } + + internal static SuggestResult DeserializeSuggestResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SuggestResultValue.DeserializeSuggestResultValue(item)); + } + value = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SuggestResult(Optional.ToList(value), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SuggestResult)} does not support '{options.Format}' format."); + } + } + + SuggestResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSuggestResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SuggestResult)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SuggestResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSuggestResult(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResult.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResult.cs new file mode 100644 index 0000000000000..0d34aee2e77a7 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResult.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The result item of the search suggest. + public partial class SuggestResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SuggestResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The result value. + /// Keeps track of any properties unknown to the library. + internal SuggestResult(IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The result value. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResultValue.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResultValue.Serialization.cs new file mode 100644 index 0000000000000..74fff302fa2e0 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResultValue.Serialization.cs @@ -0,0 +1,466 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class SuggestResultValue : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SuggestResultValue)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(SearchScore)) + { + writer.WritePropertyName("@search.score"u8); + writer.WriteNumberValue(SearchScore.Value); + } + if (Optional.IsDefined(SearchText)) + { + writer.WritePropertyName("@search.text"u8); + writer.WriteStringValue(SearchText); + } + if (Optional.IsDefined(ObjectType)) + { + writer.WritePropertyName("objectType"u8); + writer.WriteStringValue(ObjectType); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(QualifiedName)) + { + writer.WritePropertyName("qualifiedName"u8); + writer.WriteStringValue(QualifiedName); + } + if (Optional.IsDefined(EntityType)) + { + writer.WritePropertyName("entityType"u8); + writer.WriteStringValue(EntityType); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Endorsement)) + { + writer.WritePropertyName("endorsement"u8); + writer.WriteStringValue(Endorsement); + } + if (Optional.IsDefined(Owner)) + { + writer.WritePropertyName("owner"u8); + writer.WriteStringValue(Owner); + } + if (Optional.IsCollectionDefined(Classification)) + { + writer.WritePropertyName("classification"u8); + writer.WriteStartArray(); + foreach (var item in Classification) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Label)) + { + writer.WritePropertyName("label"u8); + writer.WriteStartArray(); + foreach (var item in Label) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Term)) + { + writer.WritePropertyName("term"u8); + writer.WriteStartArray(); + foreach (var item in Term) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Contact)) + { + writer.WritePropertyName("contact"u8); + writer.WriteStartArray(); + foreach (var item in Contact) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AssetType)) + { + writer.WritePropertyName("assetType"u8); + writer.WriteStartArray(); + foreach (var item in AssetType) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(GlossaryType)) + { + writer.WritePropertyName("glossaryType"u8); + writer.WriteStringValue(GlossaryType); + } + if (Optional.IsDefined(Glossary)) + { + writer.WritePropertyName("glossary"u8); + writer.WriteStringValue(Glossary); + } + if (Optional.IsDefined(TermStatus)) + { + writer.WritePropertyName("termStatus"u8); + writer.WriteStringValue(TermStatus); + } + if (Optional.IsCollectionDefined(TermTemplate)) + { + writer.WritePropertyName("termTemplate"u8); + writer.WriteStartArray(); + foreach (var item in TermTemplate) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LongDescription)) + { + writer.WritePropertyName("longDescription"u8); + writer.WriteStringValue(LongDescription); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SuggestResultValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SuggestResultValue)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSuggestResultValue(document.RootElement, options); + } + + internal static SuggestResultValue DeserializeSuggestResultValue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional searchScore = default; + Optional searchText = default; + Optional objectType = default; + Optional createTime = default; + Optional updateTime = default; + Optional id = default; + Optional name = default; + Optional qualifiedName = default; + Optional entityType = default; + Optional description = default; + Optional endorsement = default; + Optional owner = default; + Optional> classification = default; + Optional> label = default; + Optional> term = default; + Optional> contact = default; + Optional> assetType = default; + Optional glossaryType = default; + Optional glossary = default; + Optional termStatus = default; + Optional> termTemplate = default; + Optional longDescription = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("@search.score"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + searchScore = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("@search.text"u8)) + { + searchText = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("qualifiedName"u8)) + { + qualifiedName = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityType"u8)) + { + entityType = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("endorsement"u8)) + { + endorsement = property.Value.GetString(); + continue; + } + if (property.NameEquals("owner"u8)) + { + owner = property.Value.GetString(); + continue; + } + if (property.NameEquals("classification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + classification = array; + continue; + } + if (property.NameEquals("label"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + label = array; + continue; + } + if (property.NameEquals("term"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TermSearchResultValue.DeserializeTermSearchResultValue(item)); + } + term = array; + continue; + } + if (property.NameEquals("contact"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContactSearchResultValue.DeserializeContactSearchResultValue(item)); + } + contact = array; + continue; + } + if (property.NameEquals("assetType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assetType = array; + continue; + } + if (property.NameEquals("glossaryType"u8)) + { + glossaryType = property.Value.GetString(); + continue; + } + if (property.NameEquals("glossary"u8)) + { + glossary = property.Value.GetString(); + continue; + } + if (property.NameEquals("termStatus"u8)) + { + termStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("termTemplate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + termTemplate = array; + continue; + } + if (property.NameEquals("longDescription"u8)) + { + longDescription = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new SuggestResultValue(Optional.ToNullable(searchScore), searchText.Value, objectType.Value, Optional.ToNullable(createTime), Optional.ToNullable(updateTime), id.Value, name.Value, qualifiedName.Value, entityType.Value, description.Value, endorsement.Value, owner.Value, Optional.ToList(classification), Optional.ToList(label), Optional.ToList(term), Optional.ToList(contact), Optional.ToList(assetType), glossaryType.Value, glossary.Value, termStatus.Value, Optional.ToList(termTemplate), longDescription.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SuggestResultValue)} does not support '{options.Format}' format."); + } + } + + SuggestResultValue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSuggestResultValue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SuggestResultValue)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SuggestResultValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSuggestResultValue(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResultValue.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResultValue.cs new file mode 100644 index 0000000000000..130b71b326b58 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestResultValue.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The value item of the search suggest. + public partial class SuggestResultValue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SuggestResultValue() + { + Classification = new ChangeTrackingList(); + Label = new ChangeTrackingList(); + Term = new ChangeTrackingList(); + Contact = new ChangeTrackingList(); + AssetType = new ChangeTrackingList(); + TermTemplate = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The search score calculated by the search engine. The results are ordered by + /// search score by default. + /// + /// + /// The target text that contains the keyword as prefix. The keyword is wrapped + /// with emphasis mark. + /// + /// + /// The object type of the record. Object type is the top-level property to + /// distinguish whether a record is an asset or a term. + /// + /// The create time of the record. The Unix epoch format. + /// The last update time of the record. The Unix epoch format. + /// The GUID of the record. + /// The name of the record. + /// The qualified name of the record. + /// The type name of the asset. + /// The description of the asset. + /// The endorsement of the asset. + /// The owner of the record. + /// The classifications of the record. + /// The labels of the asset. + /// The terms assigned to the asset. + /// The contacts of the asset. + /// The asset types of the asset. + /// + /// The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or + /// AtlasGlossaryCategory. + /// + /// The glossary name of the term. + /// The status of the term. + /// The term template names used by the term. + /// The definition of the term. + /// Keeps track of any properties unknown to the library. + internal SuggestResultValue(float? searchScore, string searchText, string objectType, long? createTime, long? updateTime, string id, string name, string qualifiedName, string entityType, string description, string endorsement, string owner, IReadOnlyList classification, IReadOnlyList label, IReadOnlyList term, IReadOnlyList contact, IReadOnlyList assetType, string glossaryType, string glossary, string termStatus, IReadOnlyList termTemplate, string longDescription, IDictionary serializedAdditionalRawData) + { + SearchScore = searchScore; + SearchText = searchText; + ObjectType = objectType; + CreateTime = createTime; + UpdateTime = updateTime; + Id = id; + Name = name; + QualifiedName = qualifiedName; + EntityType = entityType; + Description = description; + Endorsement = endorsement; + Owner = owner; + Classification = classification; + Label = label; + Term = term; + Contact = contact; + AssetType = assetType; + GlossaryType = glossaryType; + Glossary = glossary; + TermStatus = termStatus; + TermTemplate = termTemplate; + LongDescription = longDescription; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The search score calculated by the search engine. The results are ordered by + /// search score by default. + /// + public float? SearchScore { get; } + /// + /// The target text that contains the keyword as prefix. The keyword is wrapped + /// with emphasis mark. + /// + public string SearchText { get; } + /// + /// The object type of the record. Object type is the top-level property to + /// distinguish whether a record is an asset or a term. + /// + public string ObjectType { get; } + /// The create time of the record. The Unix epoch format. + public long? CreateTime { get; } + /// The last update time of the record. The Unix epoch format. + public long? UpdateTime { get; } + /// The GUID of the record. + public string Id { get; } + /// The name of the record. + public string Name { get; } + /// The qualified name of the record. + public string QualifiedName { get; } + /// The type name of the asset. + public string EntityType { get; } + /// The description of the asset. + public string Description { get; } + /// The endorsement of the asset. + public string Endorsement { get; } + /// The owner of the record. + public string Owner { get; } + /// The classifications of the record. + public IReadOnlyList Classification { get; } + /// The labels of the asset. + public IReadOnlyList Label { get; } + /// The terms assigned to the asset. + public IReadOnlyList Term { get; } + /// The contacts of the asset. + public IReadOnlyList Contact { get; } + /// The asset types of the asset. + public IReadOnlyList AssetType { get; } + /// + /// The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or + /// AtlasGlossaryCategory. + /// + public string GlossaryType { get; } + /// The glossary name of the term. + public string Glossary { get; } + /// The status of the term. + public string TermStatus { get; } + /// The term template names used by the term. + public IReadOnlyList TermTemplate { get; } + /// The definition of the term. + public string LongDescription { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermSearchResultValue.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermSearchResultValue.Serialization.cs new file mode 100644 index 0000000000000..b19a1c102f672 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermSearchResultValue.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class TermSearchResultValue : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TermSearchResultValue)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(GlossaryName)) + { + writer.WritePropertyName("glossaryName"u8); + writer.WriteStringValue(GlossaryName); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + TermSearchResultValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TermSearchResultValue)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTermSearchResultValue(document.RootElement, options); + } + + internal static TermSearchResultValue DeserializeTermSearchResultValue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional glossaryName = default; + Optional guid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("glossaryName"u8)) + { + glossaryName = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new TermSearchResultValue(name.Value, glossaryName.Value, guid.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TermSearchResultValue)} does not support '{options.Format}' format."); + } + } + + TermSearchResultValue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTermSearchResultValue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TermSearchResultValue)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TermSearchResultValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTermSearchResultValue(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermSearchResultValue.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermSearchResultValue.cs new file mode 100644 index 0000000000000..5ce2c5ca6672c --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermSearchResultValue.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// The context. + public partial class TermSearchResultValue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal TermSearchResultValue() + { + } + + /// Initializes a new instance of . + /// The name of the term. + /// The name of the glossary which contains the term. + /// The GUID of the term. + /// Keeps track of any properties unknown to the library. + internal TermSearchResultValue(string name, string glossaryName, string guid, IDictionary serializedAdditionalRawData) + { + Name = name; + GlossaryName = glossaryName; + Guid = guid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the term. + public string Name { get; } + /// The name of the glossary which contains the term. + public string GlossaryName { get; } + /// The GUID of the term. + public string Guid { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermStatus.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermStatus.cs new file mode 100644 index 0000000000000..cdb3016944e46 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Status for term. + public readonly partial struct TermStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TermStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DraftValue = "Draft"; + private const string ApprovedValue = "Approved"; + private const string AlertValue = "Alert"; + private const string ExpiredValue = "Expired"; + + /// draft. + public static TermStatus Draft { get; } = new TermStatus(DraftValue); + /// approved. + public static TermStatus Approved { get; } = new TermStatus(ApprovedValue); + /// alert. + public static TermStatus Alert { get; } = new TermStatus(AlertValue); + /// expired. + public static TermStatus Expired { get; } = new TermStatus(ExpiredValue); + /// Determines if two values are the same. + public static bool operator ==(TermStatus left, TermStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TermStatus left, TermStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TermStatus(string value) => new TermStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TermStatus other && Equals(other); + /// + public bool Equals(TermStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermTemplateDef.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermTemplateDef.Serialization.cs new file mode 100644 index 0000000000000..70cbe183c3315 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermTemplateDef.Serialization.cs @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class TermTemplateDef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TermTemplateDef)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(CreateTime)) + { + writer.WritePropertyName("createTime"u8); + writer.WriteNumberValue(CreateTime.Value); + } + if (Optional.IsDefined(CreatedBy)) + { + writer.WritePropertyName("createdBy"u8); + writer.WriteStringValue(CreatedBy); + } + if (Optional.IsDefined(DateFormatter)) + { + writer.WritePropertyName("dateFormatter"u8); + writer.WriteObjectValue(DateFormatter); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Guid)) + { + writer.WritePropertyName("guid"u8); + writer.WriteStringValue(Guid); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Options)) + { + writer.WritePropertyName("options"u8); + writer.WriteStartObject(); + foreach (var item in Options) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ServiceType)) + { + writer.WritePropertyName("serviceType"u8); + writer.WriteStringValue(ServiceType); + } + if (Optional.IsDefined(TypeVersion)) + { + writer.WritePropertyName("typeVersion"u8); + writer.WriteStringValue(TypeVersion); + } + if (Optional.IsDefined(UpdateTime)) + { + writer.WritePropertyName("updateTime"u8); + writer.WriteNumberValue(UpdateTime.Value); + } + if (Optional.IsDefined(UpdatedBy)) + { + writer.WritePropertyName("updatedBy"u8); + writer.WriteStringValue(UpdatedBy); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsDefined(LastModifiedTS)) + { + writer.WritePropertyName("lastModifiedTS"u8); + writer.WriteStringValue(LastModifiedTS); + } + if (Optional.IsCollectionDefined(AttributeDefs)) + { + writer.WritePropertyName("attributeDefs"u8); + writer.WriteStartArray(); + foreach (var item in AttributeDefs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + TermTemplateDef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TermTemplateDef)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTermTemplateDef(document.RootElement, options); + } + + internal static TermTemplateDef DeserializeTermTemplateDef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional createTime = default; + Optional createdBy = default; + Optional dateFormatter = default; + Optional description = default; + Optional guid = default; + Optional name = default; + Optional> options0 = default; + Optional serviceType = default; + Optional typeVersion = default; + Optional updateTime = default; + Optional updatedBy = default; + Optional version = default; + Optional lastModifiedTS = default; + Optional> attributeDefs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TypeCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("createTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("createdBy"u8)) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("dateFormatter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dateFormatter = AtlasDateFormat.DeserializeAtlasDateFormat(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("guid"u8)) + { + guid = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("options"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + options0 = dictionary; + continue; + } + if (property.NameEquals("serviceType"u8)) + { + serviceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeVersion"u8)) + { + typeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("updateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updateTime = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("updatedBy"u8)) + { + updatedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastModifiedTS"u8)) + { + lastModifiedTS = property.Value.GetString(); + continue; + } + if (property.NameEquals("attributeDefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AtlasAttributeDef.DeserializeAtlasAttributeDef(item)); + } + attributeDefs = array; + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new TermTemplateDef(Optional.ToNullable(category), Optional.ToNullable(createTime), createdBy.Value, dateFormatter.Value, description.Value, guid.Value, name.Value, Optional.ToDictionary(options0), serviceType.Value, typeVersion.Value, Optional.ToNullable(updateTime), updatedBy.Value, Optional.ToNullable(version), lastModifiedTS.Value, Optional.ToList(attributeDefs), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TermTemplateDef)} does not support '{options.Format}' format."); + } + } + + TermTemplateDef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTermTemplateDef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TermTemplateDef)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TermTemplateDef FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTermTemplateDef(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermTemplateDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermTemplateDef.cs new file mode 100644 index 0000000000000..deeb77f8ee7bc --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TermTemplateDef.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Term template definition for glossary term. + public partial class TermTemplateDef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TermTemplateDef() + { + Options = new ChangeTrackingDictionary(); + AttributeDefs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The enum of type category. + /// The created time of the record. + /// The user who created the record. + /// The date format. + /// The description of the type definition. + /// The GUID of the type definition. + /// The name of the type definition. + /// The options for the type definition. + /// The service type. + /// The version of the type. + /// The update time of the record. + /// The user who updated the record. + /// The version of the record. + /// ETag for concurrency control. + /// An array of attribute definitions. + /// Keeps track of any properties unknown to the library. + internal TermTemplateDef(TypeCategory? category, long? createTime, string createdBy, AtlasDateFormat dateFormatter, string description, string guid, string name, IDictionary options, string serviceType, string typeVersion, long? updateTime, string updatedBy, long? version, string lastModifiedTS, IList attributeDefs, IDictionary serializedAdditionalRawData) + { + Category = category; + CreateTime = createTime; + CreatedBy = createdBy; + DateFormatter = dateFormatter; + Description = description; + Guid = guid; + Name = name; + Options = options; + ServiceType = serviceType; + TypeVersion = typeVersion; + UpdateTime = updateTime; + UpdatedBy = updatedBy; + Version = version; + LastModifiedTS = lastModifiedTS; + AttributeDefs = attributeDefs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The enum of type category. + public TypeCategory? Category { get; set; } + /// The created time of the record. + public long? CreateTime { get; set; } + /// The user who created the record. + public string CreatedBy { get; set; } + /// The date format. + public AtlasDateFormat DateFormatter { get; set; } + /// The description of the type definition. + public string Description { get; set; } + /// The GUID of the type definition. + public string Guid { get; set; } + /// The name of the type definition. + public string Name { get; set; } + /// The options for the type definition. + public IDictionary Options { get; } + /// The service type. + public string ServiceType { get; set; } + /// The version of the type. + public string TypeVersion { get; set; } + /// The update time of the record. + public long? UpdateTime { get; set; } + /// The user who updated the record. + public string UpdatedBy { get; set; } + /// The version of the record. + public long? Version { get; set; } + /// ETag for concurrency control. + public string LastModifiedTS { get; set; } + /// An array of attribute definitions. + public IList AttributeDefs { get; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TimeBoundary.Serialization.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TimeBoundary.Serialization.cs new file mode 100644 index 0000000000000..41abf8171a935 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TimeBoundary.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Purview.DataMap +{ + public partial class TimeBoundary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TimeBoundary)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime); + } + if (Optional.IsDefined(StartTime)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + TimeBoundary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TimeBoundary)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTimeBoundary(document.RootElement, options); + } + + internal static TimeBoundary DeserializeTimeBoundary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional endTime = default; + Optional startTime = default; + Optional timeZone = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endTime"u8)) + { + endTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new TimeBoundary(endTime.Value, startTime.Value, timeZone.Value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TimeBoundary)} does not support '{options.Format}' format."); + } + } + + TimeBoundary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTimeBoundary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TimeBoundary)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TimeBoundary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTimeBoundary(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TimeBoundary.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TimeBoundary.cs new file mode 100644 index 0000000000000..aa7489881351e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TimeBoundary.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Captures time-boundary details. + public partial class TimeBoundary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TimeBoundary() + { + } + + /// Initializes a new instance of . + /// The end of the time boundary. + /// The start of the time boundary. + /// The timezone of the time boundary. + /// Keeps track of any properties unknown to the library. + internal TimeBoundary(string endTime, string startTime, string timeZone, IDictionary serializedAdditionalRawData) + { + EndTime = endTime; + StartTime = startTime; + TimeZone = timeZone; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The end of the time boundary. + public string EndTime { get; set; } + /// The start of the time boundary. + public string StartTime { get; set; } + /// The timezone of the time boundary. + public string TimeZone { get; set; } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeCategory.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeCategory.cs new file mode 100644 index 0000000000000..ce88397ca5556 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeCategory.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Purview.DataMap +{ + /// Type Category. + public readonly partial struct TypeCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TypeCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimitiveValue = "PRIMITIVE"; + private const string ObjectIdTypeValue = "OBJECT_ID_TYPE"; + private const string EnumValue = "ENUM"; + private const string StructValue = "STRUCT"; + private const string ClassificationValue = "CLASSIFICATION"; + private const string EntityValue = "ENTITY"; + private const string ArrayValue = "ARRAY"; + private const string MapValue = "MAP"; + private const string RelationshipValue = "RELATIONSHIP"; + private const string TermTemplateValue = "TERM_TEMPLATE"; + + /// primitive. + public static TypeCategory Primitive { get; } = new TypeCategory(PrimitiveValue); + /// object id type. + public static TypeCategory ObjectIdType { get; } = new TypeCategory(ObjectIdTypeValue); + /// enum. + public static TypeCategory Enum { get; } = new TypeCategory(EnumValue); + /// struct. + public static TypeCategory Struct { get; } = new TypeCategory(StructValue); + /// classification. + public static TypeCategory Classification { get; } = new TypeCategory(ClassificationValue); + /// entity. + public static TypeCategory Entity { get; } = new TypeCategory(EntityValue); + /// array. + public static TypeCategory Array { get; } = new TypeCategory(ArrayValue); + /// map. + public static TypeCategory Map { get; } = new TypeCategory(MapValue); + /// relationship. + public static TypeCategory Relationship { get; } = new TypeCategory(RelationshipValue); + /// term template. + public static TypeCategory TermTemplate { get; } = new TypeCategory(TermTemplateValue); + /// Determines if two values are the same. + public static bool operator ==(TypeCategory left, TypeCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TypeCategory left, TypeCategory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TypeCategory(string value) => new TypeCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TypeCategory other && Equals(other); + /// + public bool Equals(TypeCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs new file mode 100644 index 0000000000000..f609b2c2e9140 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs @@ -0,0 +1,2842 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Purview.DataMap +{ + // Data plane generated sub-client. + /// The TypeDefinition sub-client. + public partial class TypeDefinition + { + private static readonly string[] AuthorizationScopes = new string[] { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of TypeDefinition for mocking. + protected TypeDefinition() + { + } + + /// Initializes a new instance of TypeDefinition. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// The to use. + /// The API version to use for this operation. + internal TypeDefinition(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get the businessMetadata definition for the given guid. + /// businessMetadata guid. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetBusinessMetadataByIdAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetBusinessMetadataByIdAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(AtlasBusinessMetadataDef.FromResponse(response), response); + } + + /// Get the businessMetadata definition for the given guid. + /// businessMetadata guid. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetBusinessMetadataById(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetBusinessMetadataById(guid, context); + return Response.FromValue(AtlasBusinessMetadataDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the businessMetadata definition for the given guid. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// businessMetadata guid. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetBusinessMetadataByIdAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetBusinessMetadataById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBusinessMetadataByIdRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the businessMetadata definition for the given guid. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// businessMetadata guid. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetBusinessMetadataById(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetBusinessMetadataById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBusinessMetadataByIdRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the businessMetadata definition by it's name (unique). + /// businessMetadata name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetBusinessMetadataByNameAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetBusinessMetadataByNameAsync(name, context).ConfigureAwait(false); + return Response.FromValue(AtlasBusinessMetadataDef.FromResponse(response), response); + } + + /// Get the businessMetadata definition by it's name (unique). + /// businessMetadata name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetBusinessMetadataByName(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetBusinessMetadataByName(name, context); + return Response.FromValue(AtlasBusinessMetadataDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the businessMetadata definition by it's name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// businessMetadata name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetBusinessMetadataByNameAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetBusinessMetadataByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBusinessMetadataByNameRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the businessMetadata definition by it's name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// businessMetadata name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetBusinessMetadataByName(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetBusinessMetadataByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBusinessMetadataByNameRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the classification definition for the given GUID. + /// The globally unique identifier of the classification. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetClassificationByIdAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetClassificationByIdAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(AtlasClassificationDef.FromResponse(response), response); + } + + /// Get the classification definition for the given GUID. + /// The globally unique identifier of the classification. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetClassificationById(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetClassificationById(guid, context); + return Response.FromValue(AtlasClassificationDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the classification definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the classification. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetClassificationByIdAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetClassificationById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassificationByIdRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the classification definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the classification. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetClassificationById(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetClassificationById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassificationByIdRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the classification definition by its name (unique). + /// The name of the classification. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetClassificationByNameAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetClassificationByNameAsync(name, context).ConfigureAwait(false); + return Response.FromValue(AtlasClassificationDef.FromResponse(response), response); + } + + /// Get the classification definition by its name (unique). + /// The name of the classification. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetClassificationByName(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetClassificationByName(name, context); + return Response.FromValue(AtlasClassificationDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the classification definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the classification. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetClassificationByNameAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetClassificationByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassificationByNameRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the classification definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the classification. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetClassificationByName(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetClassificationByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetClassificationByNameRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the Entity definition for the given GUID. + /// The globally unique identifier of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEntityByIdAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEntityByIdAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(AtlasEntityDef.FromResponse(response), response); + } + + /// Get the Entity definition for the given GUID. + /// The globally unique identifier of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEntityById(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEntityById(guid, context); + return Response.FromValue(AtlasEntityDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the Entity definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetEntityByIdAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetEntityById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEntityByIdRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the Entity definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetEntityById(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetEntityById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEntityByIdRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the entity definition by its name (unique). + /// The name of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEntityByNameAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEntityByNameAsync(name, context).ConfigureAwait(false); + return Response.FromValue(AtlasEntityDef.FromResponse(response), response); + } + + /// Get the entity definition by its name (unique). + /// The name of the entity. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEntityByName(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEntityByName(name, context); + return Response.FromValue(AtlasEntityDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the entity definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetEntityByNameAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetEntityByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEntityByNameRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the entity definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the entity. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetEntityByName(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetEntityByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEntityByNameRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the enum definition for the given GUID. + /// The globally unique identifier of the enum. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEnumByIdAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEnumByIdAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(AtlasEnumDef.FromResponse(response), response); + } + + /// Get the enum definition for the given GUID. + /// The globally unique identifier of the enum. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEnumById(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEnumById(guid, context); + return Response.FromValue(AtlasEnumDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the enum definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the enum. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetEnumByIdAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetEnumById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEnumByIdRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the enum definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the enum. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetEnumById(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetEnumById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEnumByIdRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the enum definition by its name (unique). + /// The name of the enum. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEnumByNameAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEnumByNameAsync(name, context).ConfigureAwait(false); + return Response.FromValue(AtlasEnumDef.FromResponse(response), response); + } + + /// Get the enum definition by its name (unique). + /// The name of the enum. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEnumByName(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEnumByName(name, context); + return Response.FromValue(AtlasEnumDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the enum definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the enum. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetEnumByNameAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetEnumByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEnumByNameRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the enum definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the enum. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetEnumByName(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetEnumByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEnumByNameRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the relationship definition for the given GUID. + /// The globally unique identifier of the relationship. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetRelationshipByIdAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetRelationshipByIdAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(AtlasRelationshipDef.FromResponse(response), response); + } + + /// Get the relationship definition for the given GUID. + /// The globally unique identifier of the relationship. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetRelationshipById(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetRelationshipById(guid, context); + return Response.FromValue(AtlasRelationshipDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the relationship definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the relationship. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetRelationshipByIdAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetRelationshipById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelationshipByIdRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the relationship definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the relationship. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetRelationshipById(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetRelationshipById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelationshipByIdRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the relationship definition by its name (unique). + /// The name of the relationship. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetRelationshipByNameAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetRelationshipByNameAsync(name, context).ConfigureAwait(false); + return Response.FromValue(AtlasRelationshipDef.FromResponse(response), response); + } + + /// Get the relationship definition by its name (unique). + /// The name of the relationship. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetRelationshipByName(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetRelationshipByName(name, context); + return Response.FromValue(AtlasRelationshipDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the relationship definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the relationship. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetRelationshipByNameAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetRelationshipByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelationshipByNameRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the relationship definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the relationship. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetRelationshipByName(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetRelationshipByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRelationshipByNameRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the struct definition for the given GUID. + /// The globally unique identifier of the struct. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetStructByIdAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetStructByIdAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(AtlasStructDef.FromResponse(response), response); + } + + /// Get the struct definition for the given GUID. + /// The globally unique identifier of the struct. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetStructById(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetStructById(guid, context); + return Response.FromValue(AtlasStructDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the struct definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the struct. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetStructByIdAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetStructById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetStructByIdRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the struct definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the struct. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetStructById(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetStructById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetStructByIdRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the struct definition by its name (unique). + /// The name of the struct. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetStructByNameAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetStructByNameAsync(name, context).ConfigureAwait(false); + return Response.FromValue(AtlasStructDef.FromResponse(response), response); + } + + /// Get the struct definition by its name (unique). + /// The name of the struct. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetStructByName(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetStructByName(name, context); + return Response.FromValue(AtlasStructDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the struct definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the struct. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetStructByNameAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetStructByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetStructByNameRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the struct definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the struct. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetStructByName(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetStructByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetStructByNameRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the type definition for the given GUID. + /// The globally unique identifier of the type. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetByIdAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetByIdAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(AtlasTypeDef.FromResponse(response), response); + } + + /// Get the type definition for the given GUID. + /// The globally unique identifier of the type. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetById(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetById(guid, context); + return Response.FromValue(AtlasTypeDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the type definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the type. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetByIdAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByIdRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the type definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the type. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetById(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByIdRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the type definition by its name (unique). + /// The name of the type. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetByNameAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetByNameAsync(name, context).ConfigureAwait(false); + return Response.FromValue(AtlasTypeDef.FromResponse(response), response); + } + + /// Get the type definition by its name (unique). + /// The name of the type. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetByName(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetByName(name, context); + return Response.FromValue(AtlasTypeDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the type definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetByNameAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByNameRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the type definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the type. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetByName(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetByNameRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete API for type identified by its name. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the type. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteAsync(string name, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete API for type identified by its name. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the type. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Delete(string name, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all type definitions in bulk. + /// + /// Whether include termtemplatedef when return all typedefs. + /// This is always true + /// when search filter type=term_template + /// + /// Typedef name as search filter when get typedefs. + /// The cancellation token to use. + /// + public virtual async Task> GetTypeDefinitionAsync(bool? includeTermTemplate = null, TypeCategory? type = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTypeDefinitionAsync(includeTermTemplate, type?.ToString(), context).ConfigureAwait(false); + return Response.FromValue(AtlasTypesDef.FromResponse(response), response); + } + + /// List all type definitions in bulk. + /// + /// Whether include termtemplatedef when return all typedefs. + /// This is always true + /// when search filter type=term_template + /// + /// Typedef name as search filter when get typedefs. + /// The cancellation token to use. + /// + public virtual Response GetTypeDefinition(bool? includeTermTemplate = null, TypeCategory? type = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTypeDefinition(includeTermTemplate, type?.ToString(), context); + return Response.FromValue(AtlasTypesDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] List all type definitions in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// + /// Whether include termtemplatedef when return all typedefs. + /// This is always true + /// when search filter type=term_template + /// + /// Typedef name as search filter when get typedefs. Allowed values: "PRIMITIVE" | "OBJECT_ID_TYPE" | "ENUM" | "STRUCT" | "CLASSIFICATION" | "ENTITY" | "ARRAY" | "MAP" | "RELATIONSHIP" | "TERM_TEMPLATE". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTypeDefinitionAsync(bool? includeTermTemplate, string type, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetTypeDefinition"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTypeDefinitionRequest(includeTermTemplate, type, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] List all type definitions in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// + /// Whether include termtemplatedef when return all typedefs. + /// This is always true + /// when search filter type=term_template + /// + /// Typedef name as search filter when get typedefs. Allowed values: "PRIMITIVE" | "OBJECT_ID_TYPE" | "ENUM" | "STRUCT" | "CLASSIFICATION" | "ENTITY" | "ARRAY" | "MAP" | "RELATIONSHIP" | "TERM_TEMPLATE". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTypeDefinition(bool? includeTermTemplate, string type, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetTypeDefinition"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTypeDefinitionRequest(includeTermTemplate, type, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create all atlas type definitions in bulk, only new definitions will be + /// created. + /// Any changes to the existing definitions will be discarded. + /// + /// The definitions of types. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> BatchCreateAsync(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasTypesDef.ToRequestContent(); + Response response = await BatchCreateAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AtlasTypesDef.FromResponse(response), response); + } + + /// + /// Create all atlas type definitions in bulk, only new definitions will be + /// created. + /// Any changes to the existing definitions will be discarded. + /// + /// The definitions of types. + /// The cancellation token to use. + /// is null. + /// + public virtual Response BatchCreate(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasTypesDef.ToRequestContent(); + Response response = BatchCreate(content, context); + return Response.FromValue(AtlasTypesDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Create all atlas type definitions in bulk, only new definitions will be + /// created. + /// Any changes to the existing definitions will be discarded. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task BatchCreateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.BatchCreate"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchCreateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create all atlas type definitions in bulk, only new definitions will be + /// created. + /// Any changes to the existing definitions will be discarded. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response BatchCreate(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.BatchCreate"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchCreateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update all types in bulk, changes detected in the type definitions would be + /// persisted. + /// + /// The definitions of types. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> BatchUpdateAsync(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasTypesDef.ToRequestContent(); + Response response = await BatchUpdateAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AtlasTypesDef.FromResponse(response), response); + } + + /// + /// Update all types in bulk, changes detected in the type definitions would be + /// persisted. + /// + /// The definitions of types. + /// The cancellation token to use. + /// is null. + /// + public virtual Response BatchUpdate(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasTypesDef.ToRequestContent(); + Response response = BatchUpdate(content, context); + return Response.FromValue(AtlasTypesDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Update all types in bulk, changes detected in the type definitions would be + /// persisted. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task BatchUpdateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.BatchUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchUpdateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Update all types in bulk, changes detected in the type definitions would be + /// persisted. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response BatchUpdate(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.BatchUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchUpdateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete API for all types in bulk. + /// The definitions of types. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task BatchDeleteAsync(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasTypesDef.ToRequestContent(); + Response response = await BatchDeleteAsync(content, context).ConfigureAwait(false); + return response; + } + + /// Delete API for all types in bulk. + /// The definitions of types. + /// The cancellation token to use. + /// is null. + /// + public virtual Response BatchDelete(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + + RequestContext context = FromCancellationToken(cancellationToken); + using RequestContent content = atlasTypesDef.ToRequestContent(); + Response response = BatchDelete(content, context); + return response; + } + + /// + /// [Protocol Method] Delete API for all types in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task BatchDeleteAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.BatchDelete"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchDeleteRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete API for all types in bulk. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response BatchDelete(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.BatchDelete"); + scope.Start(); + try + { + using HttpMessage message = CreateBatchDeleteRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all type definitions returned as a list of minimal information header. + /// + /// Whether include termtemplatedef when return all typedefs. + /// This is always true + /// when search filter type=term_template + /// + /// Typedef name as search filter when get typedefs. + /// The cancellation token to use. + /// + public virtual async Task>> GetHeadersAsync(bool? includeTermTemplate = null, TypeCategory? type = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetHeadersAsync(includeTermTemplate, type?.ToString(), context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasTypeDefHeader.DeserializeAtlasTypeDefHeader(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// List all type definitions returned as a list of minimal information header. + /// + /// Whether include termtemplatedef when return all typedefs. + /// This is always true + /// when search filter type=term_template + /// + /// Typedef name as search filter when get typedefs. + /// The cancellation token to use. + /// + public virtual Response> GetHeaders(bool? includeTermTemplate = null, TypeCategory? type = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetHeaders(includeTermTemplate, type?.ToString(), context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(AtlasTypeDefHeader.DeserializeAtlasTypeDefHeader(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] List all type definitions returned as a list of minimal information header. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// + /// Whether include termtemplatedef when return all typedefs. + /// This is always true + /// when search filter type=term_template + /// + /// Typedef name as search filter when get typedefs. Allowed values: "PRIMITIVE" | "OBJECT_ID_TYPE" | "ENUM" | "STRUCT" | "CLASSIFICATION" | "ENTITY" | "ARRAY" | "MAP" | "RELATIONSHIP" | "TERM_TEMPLATE". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetHeadersAsync(bool? includeTermTemplate, string type, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetHeaders"); + scope.Start(); + try + { + using HttpMessage message = CreateGetHeadersRequest(includeTermTemplate, type, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] List all type definitions returned as a list of minimal information header. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// + /// Whether include termtemplatedef when return all typedefs. + /// This is always true + /// when search filter type=term_template + /// + /// Typedef name as search filter when get typedefs. Allowed values: "PRIMITIVE" | "OBJECT_ID_TYPE" | "ENUM" | "STRUCT" | "CLASSIFICATION" | "ENTITY" | "ARRAY" | "MAP" | "RELATIONSHIP" | "TERM_TEMPLATE". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetHeaders(bool? includeTermTemplate, string type, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetHeaders"); + scope.Start(); + try + { + using HttpMessage message = CreateGetHeadersRequest(includeTermTemplate, type, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the term template definition for the given GUID. + /// The globally unique identifier of the term template. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTermTemplateByIdAsync(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTermTemplateByIdAsync(guid, context).ConfigureAwait(false); + return Response.FromValue(TermTemplateDef.FromResponse(response), response); + } + + /// Get the term template definition for the given GUID. + /// The globally unique identifier of the term template. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTermTemplateById(string guid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTermTemplateById(guid, context); + return Response.FromValue(TermTemplateDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the term template definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the term template. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTermTemplateByIdAsync(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetTermTemplateById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermTemplateByIdRequest(guid, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the term template definition for the given GUID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The globally unique identifier of the term template. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTermTemplateById(string guid, RequestContext context) + { + Argument.AssertNotNullOrEmpty(guid, nameof(guid)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetTermTemplateById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermTemplateByIdRequest(guid, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the term template definition by its name (unique). + /// The unique name of the term template. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTermTemplateByNameAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTermTemplateByNameAsync(name, context).ConfigureAwait(false); + return Response.FromValue(TermTemplateDef.FromResponse(response), response); + } + + /// Get the term template definition by its name (unique). + /// The unique name of the term template. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTermTemplateByName(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTermTemplateByName(name, context); + return Response.FromValue(TermTemplateDef.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the term template definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The unique name of the term template. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTermTemplateByNameAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetTermTemplateByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermTemplateByNameRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the term template definition by its name (unique). + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The unique name of the term template. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTermTemplateByName(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("TypeDefinition.GetTermTemplateByName"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTermTemplateByNameRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetBusinessMetadataByIdRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/businessmetadatadef/guid/", false); + uri.AppendPath(guid, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetBusinessMetadataByNameRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/businessmetadatadef/name/", false); + uri.AppendPath(name, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetClassificationByIdRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/classificationdef/guid/", false); + uri.AppendPath(guid, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetClassificationByNameRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/classificationdef/name/", false); + uri.AppendPath(name, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetEntityByIdRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/entitydef/guid/", false); + uri.AppendPath(guid, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetEntityByNameRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/entitydef/name/", false); + uri.AppendPath(name, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetEnumByIdRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/enumdef/guid/", false); + uri.AppendPath(guid, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetEnumByNameRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/enumdef/name/", false); + uri.AppendPath(name, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetRelationshipByIdRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/relationshipdef/guid/", false); + uri.AppendPath(guid, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetRelationshipByNameRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/relationshipdef/name/", false); + uri.AppendPath(name, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetStructByIdRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/structdef/guid/", false); + uri.AppendPath(guid, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetStructByNameRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/structdef/name/", false); + uri.AppendPath(name, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetByIdRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/typedef/guid/", false); + uri.AppendPath(guid, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetByNameRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/typedef/name/", false); + uri.AppendPath(name, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/typedef/name/", false); + uri.AppendPath(name, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTypeDefinitionRequest(bool? includeTermTemplate, string type, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/typedefs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (includeTermTemplate != null) + { + uri.AppendQuery("includeTermTemplate", includeTermTemplate.Value, true); + } + if (type != null) + { + uri.AppendQuery("type", type, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateBatchCreateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/typedefs", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateBatchUpdateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/typedefs", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateBatchDeleteRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/typedefs", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetHeadersRequest(bool? includeTermTemplate, string type, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/atlas/v2/types/typedefs/headers", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (includeTermTemplate != null) + { + uri.AppendQuery("includeTermTemplate", includeTermTemplate.Value, true); + } + if (type != null) + { + uri.AppendQuery("type", type, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTermTemplateByIdRequest(string guid, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/types/termtemplatedef/guid/", false); + uri.AppendPath(guid, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTermTemplateByNameRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/datamap/api", false); + uri.AppendPath("/types/termtemplatedef/name/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Properties/AssemblyInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..92d2035adfab8 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.Analytics.Purview.DataMap.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Template")] diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Azure.Analytics.Purview.DataMap.Tests.csproj b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Azure.Analytics.Purview.DataMap.Tests.csproj new file mode 100644 index 0000000000000..d7865c8cd76f1 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Azure.Analytics.Purview.DataMap.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs new file mode 100644 index 0000000000000..c0537a2341cb3 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs @@ -0,0 +1,645 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Purview.DataMap; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.Purview.DataMap.Samples +{ + public partial class Samples_Discovery + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig queryConfig = new QueryConfig(); + Response response = client.Query(queryConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig queryConfig = new QueryConfig(); + Response response = await client.QueryAsync(queryConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 1234, + continuationToken = "", + orderby = new object[] + { +new object() + }, + filter = new object(), + facets = new object[] + { +new +{ +count = 1234, +facet = "", +sort = new +{ +count = "asc", +value = "asc", +}, +} + }, + taxonomySetting = new + { + assetTypes = new object[] + { +"" + }, + }, + }); + Response response = client.Query(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("@search.count").ToString()); + Console.WriteLine(result.GetProperty("@search.count.approximate").ToString()); + Console.WriteLine(result.GetProperty("continuationToken").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("id")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("qualifiedName")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("name")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("description")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("entityType")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 1234, + continuationToken = "", + orderby = new object[] + { +new object() + }, + filter = new object(), + facets = new object[] + { +new +{ +count = 1234, +facet = "", +sort = new +{ +count = "asc", +value = "asc", +}, +} + }, + taxonomySetting = new + { + assetTypes = new object[] + { +"" + }, + }, + }); + Response response = await client.QueryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("@search.count").ToString()); + Console.WriteLine(result.GetProperty("@search.count.approximate").ToString()); + Console.WriteLine(result.GetProperty("continuationToken").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("entityType")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("assetType")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("classification")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("term")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactId")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("contactType")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("label")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("glossaryType")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termStatus")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("@search.facets").GetProperty("termTemplate")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("id")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("qualifiedName")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("name")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("description")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.highlights").GetProperty("entityType")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Query_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig queryConfig = new QueryConfig + { + Keywords = "", + Limit = 1234, + ContinuationToken = "", + Orderby = { BinaryData.FromObjectAsJson(new object()) }, + Filter = BinaryData.FromObjectAsJson(new object()), + Facets = {new SearchFacetItem +{ +Count = 1234, +Facet = "", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Ascend, +Value = SearchSortOrder.Ascend, +}, +}}, + TaxonomySetting = new SearchTaxonomySetting + { + AssetTypes = { "" }, + Facet = default, + }, + }; + Response response = client.Query(queryConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Query_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + QueryConfig queryConfig = new QueryConfig + { + Keywords = "", + Limit = 1234, + ContinuationToken = "", + Orderby = { BinaryData.FromObjectAsJson(new object()) }, + Filter = BinaryData.FromObjectAsJson(new object()), + Facets = {new SearchFacetItem +{ +Count = 1234, +Facet = "", +Sort = new SearchFacetSort +{ +Count = SearchSortOrder.Ascend, +Value = SearchSortOrder.Ascend, +}, +}}, + TaxonomySetting = new SearchTaxonomySetting + { + AssetTypes = { "" }, + Facet = default, + }, + }; + Response response = await client.QueryAsync(queryConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Suggest_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.Suggest(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Suggest_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.SuggestAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Suggest_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + SuggestConfig suggestConfig = new SuggestConfig(); + Response response = client.Suggest(suggestConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Suggest_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + SuggestConfig suggestConfig = new SuggestConfig(); + Response response = await client.SuggestAsync(suggestConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Suggest_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 1234, + filter = new object(), + }); + Response response = client.Suggest(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.text").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Suggest_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 1234, + filter = new object(), + }); + Response response = await client.SuggestAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.score").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("@search.text").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("objectType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("entityType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("endorsement").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("owner").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("classification")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("label")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("glossaryName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("term")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("contact")[0].GetProperty("contactType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("assetType")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossaryType").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("glossary").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("termStatus").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("longDescription").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_Suggest_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + SuggestConfig suggestConfig = new SuggestConfig + { + Keywords = "", + Limit = 1234, + Filter = BinaryData.FromObjectAsJson(new object()), + }; + Response response = client.Suggest(suggestConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_Suggest_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + SuggestConfig suggestConfig = new SuggestConfig + { + Keywords = "", + Limit = 1234, + Filter = BinaryData.FromObjectAsJson(new object()), + }; + Response response = await client.SuggestAsync(suggestConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_AutoComplete_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.AutoComplete(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_AutoComplete_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.AutoCompleteAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_AutoComplete_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(); + Response response = client.AutoComplete(autoCompleteConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_AutoComplete_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(); + Response response = await client.AutoCompleteAsync(autoCompleteConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_AutoComplete_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 1234, + filter = new object(), + }); + Response response = client.AutoComplete(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_AutoComplete_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + keywords = "", + limit = 1234, + filter = new object(), + }); + Response response = await client.AutoCompleteAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("queryPlusText").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Discovery_AutoComplete_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig + { + Keywords = "", + Limit = 1234, + Filter = BinaryData.FromObjectAsJson(new object()), + }; + Response response = client.AutoComplete(autoCompleteConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Discovery_AutoComplete_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); + + AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig + { + Keywords = "", + Limit = 1234, + Filter = BinaryData.FromObjectAsJson(new object()), + }; + Response response = await client.AutoCompleteAsync(autoCompleteConfig); + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs new file mode 100644 index 0000000000000..59bbd7002cf65 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs @@ -0,0 +1,7038 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Purview.DataMap; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.Purview.DataMap.Samples +{ + public partial class Samples_Entity + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_CreateOrUpdate_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.CreateOrUpdate(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_CreateOrUpdate_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.CreateOrUpdateAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_CreateOrUpdate_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); + Response response = client.CreateOrUpdate(atlasEntityWithExtInfo); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_CreateOrUpdate_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); + Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_CreateOrUpdate_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { +"" + }, + meanings = new object[] + { +new +{ +confidence = 1234, +createdBy = "", +description = "", +displayText = "", +expression = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DISCOVERED", +steward = "", +termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +} + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + }, + }, + }); + Response response = client.CreateOrUpdate(content, businessAttributeUpdateBehavior: "ignore", collectionId: ""); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_CreateOrUpdate_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { +"" + }, + meanings = new object[] + { +new +{ +confidence = 1234, +createdBy = "", +description = "", +displayText = "", +expression = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DISCOVERED", +steward = "", +termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +} + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + }, + }, + }); + Response response = await client.CreateOrUpdateAsync(content, businessAttributeUpdateBehavior: "ignore", collectionId: ""); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_CreateOrUpdate_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + { + ReferredEntities = +{ +["key"] = new AtlasEntity +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +BusinessAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +CreateTime = 1234L, +CreatedBy = "", +CustomAttributes = +{ +["key"] = "" +}, +Guid = "", +HomeId = "", +IsIncomplete = true, +Labels = {""}, +Meanings = {new AtlasTermAssignmentHeader +{ +Confidence = 1234, +CreatedBy = "", +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermAssignmentStatus.Discovered, +Steward = "", +TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +}}, +ProvenanceType = 1234, +Proxy = true, +RelationshipAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Status = EntityStatus.Active, +UpdateTime = 1234L, +UpdatedBy = "", +Version = 1234L, +Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, +} +}, + Entity = default, + }; + Response response = client.CreateOrUpdate(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_CreateOrUpdate_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + { + ReferredEntities = +{ +["key"] = new AtlasEntity +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +BusinessAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +CreateTime = 1234L, +CreatedBy = "", +CustomAttributes = +{ +["key"] = "" +}, +Guid = "", +HomeId = "", +IsIncomplete = true, +Labels = {""}, +Meanings = {new AtlasTermAssignmentHeader +{ +Confidence = 1234, +CreatedBy = "", +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermAssignmentStatus.Discovered, +Steward = "", +TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +}}, +ProvenanceType = 1234, +Proxy = true, +RelationshipAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Status = EntityStatus.Active, +UpdateTime = 1234L, +UpdatedBy = "", +Version = 1234L, +Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, +} +}, + Entity = default, + }; + Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetByIds_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetByIds(new string[] { "" }, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetByIds_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetByIdsAsync(new string[] { "" }, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetByIds_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetByIds(new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetByIds_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetByIdsAsync(new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetByIds_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + Response response = client.GetByIds(new string[] { "" }, true, true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetByIds_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + Response response = await client.GetByIdsAsync(new string[] { "" }, true, true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetByIds_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + Response response = client.GetByIds(new string[] { "" }, minExtInfo: true, ignoreRelationships: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetByIds_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + Response response = await client.GetByIdsAsync(new string[] { "" }, minExtInfo: true, ignoreRelationships: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchCreateOrUpdate_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.BatchCreateOrUpdate(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchCreateOrUpdate_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.BatchCreateOrUpdateAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchCreateOrUpdate_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); + Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchCreateOrUpdate_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); + Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchCreateOrUpdate_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { +"" + }, + meanings = new object[] + { +new +{ +confidence = 1234, +createdBy = "", +description = "", +displayText = "", +expression = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DISCOVERED", +steward = "", +termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +} + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + }, + }, + entities = new object[] + { +null + }, + }); + Response response = client.BatchCreateOrUpdate(content, collectionId: "", businessAttributeUpdateBehavior: "ignore"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { +"" + }, + meanings = new object[] + { +new +{ +confidence = 1234, +createdBy = "", +description = "", +displayText = "", +expression = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DISCOVERED", +steward = "", +termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +} + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + }, + }, + entities = new object[] + { +null + }, + }); + Response response = await client.BatchCreateOrUpdateAsync(content, collectionId: "", businessAttributeUpdateBehavior: "ignore"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo + { + ReferredEntities = +{ +["key"] = new AtlasEntity +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +BusinessAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +CreateTime = 1234L, +CreatedBy = "", +CustomAttributes = +{ +["key"] = "" +}, +Guid = "", +HomeId = "", +IsIncomplete = true, +Labels = {""}, +Meanings = {new AtlasTermAssignmentHeader +{ +Confidence = 1234, +CreatedBy = "", +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermAssignmentStatus.Discovered, +Steward = "", +TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +}}, +ProvenanceType = 1234, +Proxy = true, +RelationshipAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Status = EntityStatus.Active, +UpdateTime = 1234L, +UpdatedBy = "", +Version = 1234L, +Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, +} +}, + Entities = { default }, + }; + Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo + { + ReferredEntities = +{ +["key"] = new AtlasEntity +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +BusinessAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +CreateTime = 1234L, +CreatedBy = "", +CustomAttributes = +{ +["key"] = "" +}, +Guid = "", +HomeId = "", +IsIncomplete = true, +Labels = {""}, +Meanings = {new AtlasTermAssignmentHeader +{ +Confidence = 1234, +CreatedBy = "", +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermAssignmentStatus.Discovered, +Steward = "", +TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +}}, +ProvenanceType = 1234, +Proxy = true, +RelationshipAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Status = EntityStatus.Active, +UpdateTime = 1234L, +UpdatedBy = "", +Version = 1234L, +Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, +} +}, + Entities = { default }, + }; + Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchDelete_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.BatchDelete(new string[] { "" }, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchDelete_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.BatchDeleteAsync(new string[] { "" }, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchDelete_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.BatchDelete(new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchDelete_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.BatchDeleteAsync(new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchDelete_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.BatchDelete(new string[] { "" }, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchDelete_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.BatchDeleteAsync(new string[] { "" }, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchDelete_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.BatchDelete(new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchDelete_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.BatchDeleteAsync(new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassification_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.AddClassification(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassification_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.AddClassificationAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassification_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); + Response response = client.AddClassification(classificationAssociateConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassification_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); + Response response = await client.AddClassificationAsync(classificationAssociateConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassification_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + classification = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { +new +{ +endTime = "", +startTime = "", +timeZone = "", +} + }, + }, + entityGuids = new object[] + { +"" + }, + }); + Response response = client.AddClassification(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassification_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + classification = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + entityGuid = "", + entityStatus = "ACTIVE", + removePropagationsOnEntityDelete = true, + validityPeriods = new object[] + { +new +{ +endTime = "", +startTime = "", +timeZone = "", +} + }, + }, + entityGuids = new object[] + { +"" + }, + }); + Response response = await client.AddClassificationAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassification_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig + { + Classification = new AtlasClassification + { + Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, + }, + EntityGuids = { "" }, + }; + Response response = client.AddClassification(classificationAssociateConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassification_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig + { + Classification = new AtlasClassification + { + Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, + }, + EntityGuids = { "" }, + }; + Response response = await client.AddClassificationAsync(classificationAssociateConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetEntity_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetEntity("", null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetEntity_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetEntityAsync("", null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetEntity_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetEntity(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetEntity_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetEntityAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetEntity_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetEntity("", true, true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetEntity_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetEntityAsync("", true, true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetEntity_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetEntity("", minExtInfo: true, ignoreRelationships: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetEntity_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetEntityAsync("", minExtInfo: true, ignoreRelationships: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateAttributeById_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateAttributeById("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateAttributeById_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateAttributeByIdAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateAttributeById_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.UpdateAttributeById("", "", BinaryData.FromObjectAsJson(new object())); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateAttributeById_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.UpdateAttributeByIdAsync("", "", BinaryData.FromObjectAsJson(new object())); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateAttributeById_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateAttributeById("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateAttributeById_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateAttributeByIdAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateAttributeById_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.UpdateAttributeById("", "", BinaryData.FromObjectAsJson(new object())); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateAttributeById_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.UpdateAttributeByIdAsync("", "", BinaryData.FromObjectAsJson(new object())); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_Delete_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.Delete("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_Delete_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DeleteAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_Delete_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.Delete(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_Delete_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DeleteAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_Delete_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.Delete("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_Delete_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DeleteAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_Delete_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.Delete(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_Delete_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DeleteAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetClassification_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetClassification("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetClassification_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetClassificationAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetClassification_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetClassification("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetClassification_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetClassificationAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetClassification_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetClassification("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetClassification_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetClassificationAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetClassification_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetClassification("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetClassification_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetClassificationAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveClassification_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveClassification("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveClassification_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveClassificationAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveClassification_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveClassification("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveClassification_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveClassificationAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetClassifications_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetClassifications("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetClassifications_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetClassificationsAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetClassifications_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetClassifications(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetClassifications_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetClassificationsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetClassifications_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetClassifications("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("list")[0].ToString()); + Console.WriteLine(result.GetProperty("pageSize").ToString()); + Console.WriteLine(result.GetProperty("sortBy").ToString()); + Console.WriteLine(result.GetProperty("sortType").ToString()); + Console.WriteLine(result.GetProperty("startIndex").ToString()); + Console.WriteLine(result.GetProperty("totalCount").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetClassifications_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetClassificationsAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("list")[0].ToString()); + Console.WriteLine(result.GetProperty("pageSize").ToString()); + Console.WriteLine(result.GetProperty("sortBy").ToString()); + Console.WriteLine(result.GetProperty("sortType").ToString()); + Console.WriteLine(result.GetProperty("startIndex").ToString()); + Console.WriteLine(result.GetProperty("totalCount").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetClassifications_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetClassifications(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetClassifications_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetClassificationsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassifications_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = client.AddClassifications("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassifications_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = await client.AddClassificationsAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassifications_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddClassifications("", new AtlasClassification[] + { +new AtlasClassification() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassifications_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddClassificationsAsync("", new AtlasClassification[] + { +new AtlasClassification() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassifications_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }); + Response response = client.AddClassifications("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassifications_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }); + Response response = await client.AddClassificationsAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassifications_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddClassifications("", new AtlasClassification[] + { +new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassifications_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddClassificationsAsync("", new AtlasClassification[] + { +new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateClassifications_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = client.UpdateClassifications("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateClassifications_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = await client.UpdateClassificationsAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateClassifications_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.UpdateClassifications("", new AtlasClassification[] + { +new AtlasClassification() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateClassifications_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.UpdateClassificationsAsync("", new AtlasClassification[] + { +new AtlasClassification() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateClassifications_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }); + Response response = client.UpdateClassifications("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateClassifications_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }); + Response response = await client.UpdateClassificationsAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateClassifications_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.UpdateClassifications("", new AtlasClassification[] + { +new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateClassifications_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.UpdateClassificationsAsync("", new AtlasClassification[] + { +new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetByUniqueAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetByUniqueAttribute("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetByUniqueAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetByUniqueAttributeAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetByUniqueAttribute_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetByUniqueAttribute(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetByUniqueAttribute_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetByUniqueAttributeAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetByUniqueAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetByUniqueAttribute("", true, true, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetByUniqueAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetByUniqueAttributeAsync("", true, true, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetByUniqueAttribute_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetByUniqueAttribute("", minExtInfo: true, ignoreRelationships: true, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetByUniqueAttribute_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetByUniqueAttributeAsync("", minExtInfo: true, ignoreRelationships: true, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateByUniqueAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateByUniqueAttribute("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateByUniqueAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateByUniqueAttributeAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateByUniqueAttribute_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); + Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateByUniqueAttribute_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); + Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateByUniqueAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { +"" + }, + meanings = new object[] + { +new +{ +confidence = 1234, +createdBy = "", +description = "", +displayText = "", +expression = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DISCOVERED", +steward = "", +termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +} + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + }, + }, + }); + Response response = client.UpdateByUniqueAttribute("", content, attribute: ""); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + referredEntities = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + businessAttributes = new + { + key = new object(), + }, + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + createTime = 1234L, + createdBy = "", + customAttributes = new + { + key = "", + }, + guid = "", + homeId = "", + isIncomplete = true, + labels = new object[] + { +"" + }, + meanings = new object[] + { +new +{ +confidence = 1234, +createdBy = "", +description = "", +displayText = "", +expression = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DISCOVERED", +steward = "", +termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +} + }, + provenanceType = 1234, + proxy = true, + relationshipAttributes = new + { + key = new object(), + }, + status = "ACTIVE", + updateTime = 1234L, + updatedBy = "", + version = 1234L, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + }, + }, + }); + Response response = await client.UpdateByUniqueAttributeAsync("", content, attribute: ""); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + { + ReferredEntities = +{ +["key"] = new AtlasEntity +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +BusinessAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +CreateTime = 1234L, +CreatedBy = "", +CustomAttributes = +{ +["key"] = "" +}, +Guid = "", +HomeId = "", +IsIncomplete = true, +Labels = {""}, +Meanings = {new AtlasTermAssignmentHeader +{ +Confidence = 1234, +CreatedBy = "", +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermAssignmentStatus.Discovered, +Steward = "", +TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +}}, +ProvenanceType = 1234, +Proxy = true, +RelationshipAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Status = EntityStatus.Active, +UpdateTime = 1234L, +UpdatedBy = "", +Version = 1234L, +Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, +} +}, + Entity = default, + }; + Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + { + ReferredEntities = +{ +["key"] = new AtlasEntity +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +BusinessAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +CreateTime = 1234L, +CreatedBy = "", +CustomAttributes = +{ +["key"] = "" +}, +Guid = "", +HomeId = "", +IsIncomplete = true, +Labels = {""}, +Meanings = {new AtlasTermAssignmentHeader +{ +Confidence = 1234, +CreatedBy = "", +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermAssignmentStatus.Discovered, +Steward = "", +TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +}}, +ProvenanceType = 1234, +Proxy = true, +RelationshipAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Status = EntityStatus.Active, +UpdateTime = 1234L, +UpdatedBy = "", +Version = 1234L, +Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, +} +}, + Entity = default, + }; + Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_DeleteByUniqueAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.DeleteByUniqueAttribute("", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_DeleteByUniqueAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DeleteByUniqueAttributeAsync("", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_DeleteByUniqueAttribute_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.DeleteByUniqueAttribute(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_DeleteByUniqueAttribute_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DeleteByUniqueAttributeAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_DeleteByUniqueAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.DeleteByUniqueAttribute("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_DeleteByUniqueAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DeleteByUniqueAttributeAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_DeleteByUniqueAttribute_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.DeleteByUniqueAttribute("", attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_DeleteByUniqueAttribute_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DeleteByUniqueAttributeAsync("", attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveClassificationByUniqueAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveClassificationByUniqueAttribute("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveClassificationByUniqueAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveClassificationByUniqueAttributeAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveClassificationByUniqueAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveClassificationByUniqueAttribute("", "", attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveClassificationByUniqueAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveClassificationByUniqueAttributeAsync("", "", attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassificationsByUniqueAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = client.AddClassificationsByUniqueAttribute("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassificationsByUniqueAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = await client.AddClassificationsByUniqueAttributeAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassificationsByUniqueAttribute_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddClassificationsByUniqueAttribute("", new AtlasClassification[] + { +new AtlasClassification() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassificationsByUniqueAttribute_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddClassificationsByUniqueAttributeAsync("", new AtlasClassification[] + { +new AtlasClassification() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassificationsByUniqueAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }); + Response response = client.AddClassificationsByUniqueAttribute("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassificationsByUniqueAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }); + Response response = await client.AddClassificationsByUniqueAttributeAsync("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddClassificationsByUniqueAttribute_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddClassificationsByUniqueAttribute("", new AtlasClassification[] + { +new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +} + }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddClassificationsByUniqueAttribute_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddClassificationsByUniqueAttributeAsync("", new AtlasClassification[] + { +new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +} + }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateClassificationsUniqueByAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = client.UpdateClassificationsUniqueByAttribute("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateClassificationsUniqueByAttribute_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.UpdateClassificationsUniqueByAttribute("", new AtlasClassification[] + { +new AtlasClassification() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", new AtlasClassification[] + { +new AtlasClassification() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateClassificationsUniqueByAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }); + Response response = client.UpdateClassificationsUniqueByAttribute("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }); + Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_UpdateClassificationsUniqueByAttribute_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.UpdateClassificationsUniqueByAttribute("", new AtlasClassification[] + { +new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +} + }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_UpdateClassificationsUniqueByAttribute_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.UpdateClassificationsUniqueByAttributeAsync("", new AtlasClassification[] + { +new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +} + }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchSetClassifications_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.BatchSetClassifications(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchSetClassifications_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.BatchSetClassificationsAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchSetClassifications_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); + Response> response = client.BatchSetClassifications(atlasEntityHeaders); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchSetClassifications_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); + Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchSetClassifications_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + guidHeaderMap = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + classificationNames = new object[] + { +"" + }, + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + displayText = "", + guid = "", + isIncomplete = true, + labels = new object[] + { +"" + }, + meaningNames = new object[] + { +"" + }, + meanings = new object[] + { +new +{ +confidence = 1234, +createdBy = "", +description = "", +displayText = "", +expression = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DISCOVERED", +steward = "", +termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +} + }, + status = "ACTIVE", + }, + }, + }); + Response response = client.BatchSetClassifications(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchSetClassifications_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + guidHeaderMap = new + { + key = new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + classificationNames = new object[] + { +"" + }, + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + displayText = "", + guid = "", + isIncomplete = true, + labels = new object[] + { +"" + }, + meaningNames = new object[] + { +"" + }, + meanings = new object[] + { +new +{ +confidence = 1234, +createdBy = "", +description = "", +displayText = "", +expression = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DISCOVERED", +steward = "", +termGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +} + }, + status = "ACTIVE", + }, + }, + }); + Response response = await client.BatchSetClassificationsAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchSetClassifications_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders + { + GuidHeaderMap = +{ +["key"] = new AtlasEntityHeader +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +ClassificationNames = {""}, +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +DisplayText = "", +Guid = "", +IsIncomplete = true, +Labels = {""}, +MeaningNames = {""}, +Meanings = {new AtlasTermAssignmentHeader +{ +Confidence = 1234, +CreatedBy = "", +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermAssignmentStatus.Discovered, +Steward = "", +TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +}}, +Status = EntityStatus.Active, +} +}, + }; + Response> response = client.BatchSetClassifications(atlasEntityHeaders); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchSetClassifications_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders + { + GuidHeaderMap = +{ +["key"] = new AtlasEntityHeader +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +ClassificationNames = {""}, +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +DisplayText = "", +Guid = "", +IsIncomplete = true, +Labels = {""}, +MeaningNames = {""}, +Meanings = {new AtlasTermAssignmentHeader +{ +Confidence = 1234, +CreatedBy = "", +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermAssignmentStatus.Discovered, +Steward = "", +TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +}}, +Status = EntityStatus.Active, +} +}, + }; + Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchGetByUniqueAttributes_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.BatchGetByUniqueAttributes("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchGetByUniqueAttributes_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.BatchGetByUniqueAttributesAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchGetByUniqueAttributes_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.BatchGetByUniqueAttributes(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchGetByUniqueAttributes_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.BatchGetByUniqueAttributesAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchGetByUniqueAttributes_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.BatchGetByUniqueAttributes("", true, true, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchGetByUniqueAttributes_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.BatchGetByUniqueAttributesAsync("", true, true, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("referredEntities").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("businessAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("customAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("homeId").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("collectionId").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("provenanceType").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("proxy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("relationshipAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_BatchGetByUniqueAttributes_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.BatchGetByUniqueAttributes("", minExtInfo: true, ignoreRelationships: true, attrNQualifiedName: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_BatchGetByUniqueAttributes_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.BatchGetByUniqueAttributesAsync("", minExtInfo: true, ignoreRelationships: true, attrNQualifiedName: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetHeader_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetHeader("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetHeader_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetHeaderAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetHeader_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetHeader(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetHeader_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetHeaderAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetHeader_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetHeader("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetHeader_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetHeaderAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetHeader_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetHeader(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetHeader_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetHeaderAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveBusinessMetadata_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new + { + key = new object(), + }, + }); + Response response = client.RemoveBusinessMetadata("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveBusinessMetadata_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new + { + key = new object(), + }, + }); + Response response = await client.RemoveBusinessMetadataAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveBusinessMetadata_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveBusinessMetadata("", new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveBusinessMetadata_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveBusinessMetadataAsync("", new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveBusinessMetadata_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new + { + key = new object(), + }, + }); + Response response = client.RemoveBusinessMetadata("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveBusinessMetadata_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new + { + key = new object(), + }, + }); + Response response = await client.RemoveBusinessMetadataAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveBusinessMetadata_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveBusinessMetadata("", new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveBusinessMetadata_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveBusinessMetadataAsync("", new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddOrUpdateBusinessMetadata_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new + { + key = new object(), + }, + }); + Response response = client.AddOrUpdateBusinessMetadata("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddOrUpdateBusinessMetadata_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new + { + key = new object(), + }, + }); + Response response = await client.AddOrUpdateBusinessMetadataAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddOrUpdateBusinessMetadata_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddOrUpdateBusinessMetadata("", new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddOrUpdateBusinessMetadata_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddOrUpdateBusinessMetadataAsync("", new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddOrUpdateBusinessMetadata_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new + { + key = new object(), + }, + }); + Response response = client.AddOrUpdateBusinessMetadata("", content, overwrite: true); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddOrUpdateBusinessMetadata_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new + { + key = new object(), + }, + }); + Response response = await client.AddOrUpdateBusinessMetadataAsync("", content, overwrite: true); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddOrUpdateBusinessMetadata_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddOrUpdateBusinessMetadata("", new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, overwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddOrUpdateBusinessMetadata_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddOrUpdateBusinessMetadataAsync("", new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, overwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveBusinessMetadataAttributes_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new object(), + }); + Response response = client.RemoveBusinessMetadataAttributes("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveBusinessMetadataAttributes_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new object(), + }); + Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveBusinessMetadataAttributes_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveBusinessMetadataAttributes("", "", new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveBusinessMetadataAttributes_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveBusinessMetadataAttributes_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new object(), + }); + Response response = client.RemoveBusinessMetadataAttributes("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveBusinessMetadataAttributes_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new object(), + }); + Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveBusinessMetadataAttributes_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveBusinessMetadataAttributes("", "", new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveBusinessMetadataAttributes_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveBusinessMetadataAttributesAsync("", "", new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new object(), + }); + Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new object(), + }); + Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new object(), + }); + Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + key = new object(), + }); + Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddOrUpdateBusinessMetadataAttributes_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddOrUpdateBusinessMetadataAttributes("", "", new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddOrUpdateBusinessMetadataAttributes_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddOrUpdateBusinessMetadataAttributesAsync("", "", new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetBusinessMetadataTemplate_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetBusinessMetadataTemplate(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetBusinessMetadataTemplate_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetBusinessMetadataTemplateAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetBusinessMetadataTemplate_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetBusinessMetadataTemplate(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetBusinessMetadataTemplate_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetBusinessMetadataTemplateAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetBusinessMetadataTemplate_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetBusinessMetadataTemplate(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetBusinessMetadataTemplate_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetBusinessMetadataTemplateAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_GetBusinessMetadataTemplate_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.GetBusinessMetadataTemplate(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_GetBusinessMetadataTemplate_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.GetBusinessMetadataTemplateAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_ImportBusinessMetadata_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + file = new object(), + }); + Response response = client.ImportBusinessMetadata(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_ImportBusinessMetadata_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + file = new object(), + }); + Response response = await client.ImportBusinessMetadataAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_ImportBusinessMetadata_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.ImportBusinessMetadata(BinaryData.FromObjectAsJson(new object())); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_ImportBusinessMetadata_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.ImportBusinessMetadataAsync(BinaryData.FromObjectAsJson(new object())); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_ImportBusinessMetadata_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + file = new object(), + }); + Response response = client.ImportBusinessMetadata(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); + Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("importStatus").ToString()); + Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("parentObjectName").ToString()); + Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("remarks").ToString()); + Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("childObjectName").ToString()); + Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); + Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); + Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_ImportBusinessMetadata_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new + { + file = new object(), + }); + Response response = await client.ImportBusinessMetadataAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("childObjectName").ToString()); + Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("importStatus").ToString()); + Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("parentObjectName").ToString()); + Console.WriteLine(result.GetProperty("failedImportInfoList")[0].GetProperty("remarks").ToString()); + Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("childObjectName").ToString()); + Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("importStatus").ToString()); + Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("parentObjectName").ToString()); + Console.WriteLine(result.GetProperty("successImportInfoList")[0].GetProperty("remarks").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_ImportBusinessMetadata_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.ImportBusinessMetadata(BinaryData.FromObjectAsJson(new object())); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_ImportBusinessMetadata_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.ImportBusinessMetadataAsync(BinaryData.FromObjectAsJson(new object())); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveLabels_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = client.RemoveLabels("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveLabels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = await client.RemoveLabelsAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveLabels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveLabels(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveLabels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveLabelsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveLabels_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = client.RemoveLabels("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveLabels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = await client.RemoveLabelsAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveLabels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveLabels("", body: new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveLabels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveLabelsAsync("", body: new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_SetLabels_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = client.SetLabels("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_SetLabels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = await client.SetLabelsAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_SetLabels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.SetLabels(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_SetLabels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.SetLabelsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_SetLabels_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = client.SetLabels("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_SetLabels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = await client.SetLabelsAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_SetLabels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.SetLabels("", body: new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_SetLabels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.SetLabelsAsync("", body: new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddLabel_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = client.AddLabel("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddLabel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = await client.AddLabelAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddLabel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddLabel(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddLabel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddLabelAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddLabel_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = client.AddLabel("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddLabel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = await client.AddLabelAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddLabel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddLabel("", body: new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddLabel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddLabelAsync("", body: new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveLabelsByUniqueAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = client.RemoveLabelsByUniqueAttribute("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveLabelsByUniqueAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = await client.RemoveLabelsByUniqueAttributeAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveLabelsByUniqueAttribute_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveLabelsByUniqueAttribute(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveLabelsByUniqueAttribute_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveLabelsByUniqueAttributeAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveLabelsByUniqueAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = client.RemoveLabelsByUniqueAttribute("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveLabelsByUniqueAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = await client.RemoveLabelsByUniqueAttributeAsync("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_RemoveLabelsByUniqueAttribute_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.RemoveLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_RemoveLabelsByUniqueAttribute_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.RemoveLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_SetLabelsByUniqueAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = client.SetLabelsByUniqueAttribute("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_SetLabelsByUniqueAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = await client.SetLabelsByUniqueAttributeAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_SetLabelsByUniqueAttribute_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.SetLabelsByUniqueAttribute(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_SetLabelsByUniqueAttribute_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.SetLabelsByUniqueAttributeAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_SetLabelsByUniqueAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = client.SetLabelsByUniqueAttribute("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_SetLabelsByUniqueAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = await client.SetLabelsByUniqueAttributeAsync("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_SetLabelsByUniqueAttribute_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.SetLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_SetLabelsByUniqueAttribute_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.SetLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddLabelsByUniqueAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = client.AddLabelsByUniqueAttribute("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddLabelsByUniqueAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = null; + Response response = await client.AddLabelsByUniqueAttributeAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddLabelsByUniqueAttribute_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddLabelsByUniqueAttribute(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddLabelsByUniqueAttribute_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddLabelsByUniqueAttributeAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddLabelsByUniqueAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = client.AddLabelsByUniqueAttribute("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddLabelsByUniqueAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +"" + }); + Response response = await client.AddLabelsByUniqueAttributeAsync("", content, attribute: ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_AddLabelsByUniqueAttribute_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = client.AddLabelsByUniqueAttribute("", body: new string[] { "" }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_AddLabelsByUniqueAttribute_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); + + Response response = await client.AddLabelsByUniqueAttributeAsync("", body: new string[] { "" }, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_MoveEntitiesToCollection_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.MoveEntitiesToCollection("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_MoveEntitiesToCollection_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.MoveEntitiesToCollectionAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_MoveEntitiesToCollection_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(); + Response response = client.MoveEntitiesToCollection("", moveEntitiesConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_MoveEntitiesToCollection_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(); + Response response = await client.MoveEntitiesToCollectionAsync("", moveEntitiesConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_MoveEntitiesToCollection_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + entityGuids = new object[] + { +"" + }, + }); + Response response = client.MoveEntitiesToCollection("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_MoveEntitiesToCollection_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + entityGuids = new object[] + { +"" + }, + }); + Response response = await client.MoveEntitiesToCollectionAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guidAssignments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("mutatedEntities").GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_MoveEntitiesToCollection_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig + { + EntityGuids = { "" }, + }; + Response response = client.MoveEntitiesToCollection("", moveEntitiesConfig); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_MoveEntitiesToCollection_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); + + MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig + { + EntityGuids = { "" }, + }; + Response response = await client.MoveEntitiesToCollectionAsync("", moveEntitiesConfig); + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs new file mode 100644 index 0000000000000..7e035156412f7 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs @@ -0,0 +1,9394 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Purview.DataMap; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.Purview.DataMap.Samples +{ + public partial class Samples_Glossary + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_BatchGet_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.BatchGet(null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_BatchGet_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.BatchGetAsync(null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_BatchGet_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.BatchGet(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_BatchGet_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.BatchGetAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_BatchGet_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = client.BatchGet(1234, 1234, "", true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_BatchGet_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = await client.BatchGetAsync(1234, 1234, "", true, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("language").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_BatchGet_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response> response = client.BatchGet(limit: 1234, offset: 1234, sort: "", ignoreTermsAndCategories: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_BatchGet_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response> response = await client.BatchGetAsync(limit: 1234, offset: 1234, sort: "", ignoreTermsAndCategories: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Create_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.Create(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Create_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.CreateAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Create_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossary atlasGlossary = new AtlasGlossary(); + Response response = client.Create(atlasGlossary); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Create_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossary atlasGlossary = new AtlasGlossary(); + Response response = await client.CreateAsync(atlasGlossary); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Create_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + categories = new object[] + { +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} + }, + language = "", + terms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + usage = "", + }); + Response response = client.Create(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Create_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + categories = new object[] + { +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} + }, + language = "", + terms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + usage = "", + }); + Response response = await client.CreateAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Create_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossary atlasGlossary = new AtlasGlossary + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Categories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, + Language = "", + Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + Usage = "", + }; + Response response = client.Create(atlasGlossary); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Create_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossary atlasGlossary = new AtlasGlossary + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Categories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, + Language = "", + Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + Usage = "", + }; + Response response = await client.CreateAsync(atlasGlossary); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateCategories_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = client.CreateCategories(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateCategories_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = await client.CreateCategoriesAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateCategories_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.CreateCategories(new AtlasGlossaryCategory[] + { +new AtlasGlossaryCategory() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateCategories_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.CreateCategoriesAsync(new AtlasGlossaryCategory[] + { +new AtlasGlossaryCategory() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateCategories_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "", +classifications = new object[] +{ +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} +}, +longDescription = "", +name = "", +qualifiedName = "", +shortDescription = "", +lastModifiedTS = "", +createTime = 1234L, +createdBy = "", +updateTime = 1234L, +updatedBy = "", +anchor = new +{ +displayText = "", +glossaryGuid = "", +relationGuid = "", +}, +childrenCategories = new object[] +{ +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} +}, +terms = new object[] +{ +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} +}, +} + }); + Response response = client.CreateCategories(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateCategories_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "", +classifications = new object[] +{ +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} +}, +longDescription = "", +name = "", +qualifiedName = "", +shortDescription = "", +lastModifiedTS = "", +createTime = 1234L, +createdBy = "", +updateTime = 1234L, +updatedBy = "", +anchor = new +{ +displayText = "", +glossaryGuid = "", +relationGuid = "", +}, +childrenCategories = new object[] +{ +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} +}, +terms = new object[] +{ +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} +}, +} + }); + Response response = await client.CreateCategoriesAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateCategories_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.CreateCategories(new AtlasGlossaryCategory[] + { +new AtlasGlossaryCategory +{ +Guid = "", +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +LongDescription = "", +Name = "", +QualifiedName = "", +ShortDescription = "", +LastModifiedTS = "", +CreateTime = 1234L, +CreatedBy = "", +UpdateTime = 1234L, +UpdatedBy = "", +Anchor = new AtlasGlossaryHeader +{ +DisplayText = "", +GlossaryGuid = "", +RelationGuid = "", +}, +ChildrenCategories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, +ParentCategory = default, +Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateCategories_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.CreateCategoriesAsync(new AtlasGlossaryCategory[] + { +new AtlasGlossaryCategory +{ +Guid = "", +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +LongDescription = "", +Name = "", +QualifiedName = "", +ShortDescription = "", +LastModifiedTS = "", +CreateTime = 1234L, +CreatedBy = "", +UpdateTime = 1234L, +UpdatedBy = "", +Anchor = new AtlasGlossaryHeader +{ +DisplayText = "", +GlossaryGuid = "", +RelationGuid = "", +}, +ChildrenCategories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, +ParentCategory = default, +Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateCategory_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.CreateCategory(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateCategory_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.CreateCategoryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateCategory_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); + Response response = client.CreateCategory(atlasGlossaryCategory); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateCategory_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); + Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateCategory_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} + }, + terms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + }); + Response response = client.CreateCategory(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateCategory_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} + }, + terms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + }); + Response response = await client.CreateCategoryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateCategory_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + }; + Response response = client.CreateCategory(atlasGlossaryCategory); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateCategory_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + }; + Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategory_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategory("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategory_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoryAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategory_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategory(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategory_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoryAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategory_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategory("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategory_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoryAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategory_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategory(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategory_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoryAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_UpdateCategory_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateCategory("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_UpdateCategory_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateCategoryAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_UpdateCategory_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); + Response response = client.UpdateCategory("", atlasGlossaryCategory); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_UpdateCategory_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); + Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_UpdateCategory_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} + }, + terms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + }); + Response response = client.UpdateCategory("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_UpdateCategory_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + childrenCategories = new object[] + { +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} + }, + terms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + }); + Response response = await client.UpdateCategoryAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_UpdateCategory_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + }; + Response response = client.UpdateCategory("", atlasGlossaryCategory); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_UpdateCategory_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + ChildrenCategories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, + ParentCategory = default, + Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + }; + Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DeleteCategory_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.DeleteCategory(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DeleteCategory_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DeleteCategoryAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DeleteCategory_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.DeleteCategory(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DeleteCategory_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DeleteCategoryAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdateCategory_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = client.PartialUpdateCategory("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdateCategory_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = await client.PartialUpdateCategoryAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdateCategory_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.PartialUpdateCategory("", new Dictionary + { + ["key"] = "" + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdateCategory_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.PartialUpdateCategoryAsync("", new Dictionary + { + ["key"] = "" + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdateCategory_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = client.PartialUpdateCategory("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdateCategory_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = await client.PartialUpdateCategoryAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdateCategory_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.PartialUpdateCategory("", new Dictionary + { + ["key"] = "" + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdateCategory_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.PartialUpdateCategoryAsync("", new Dictionary + { + ["key"] = "" + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetRelatedCategories_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetRelatedCategories("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetRelatedCategories_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetRelatedCategoriesAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetRelatedCategories_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response>> response = client.GetRelatedCategories(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetRelatedCategories_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response>> response = await client.GetRelatedCategoriesAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetRelatedCategories_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetRelatedCategories("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetRelatedCategories_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetRelatedCategoriesAsync("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetRelatedCategories_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response>> response = client.GetRelatedCategories("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetRelatedCategories_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response>> response = await client.GetRelatedCategoriesAsync("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategoryTerms_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategoryTerms("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategoryTerms_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoryTermsAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategoryTerms_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetCategoryTerms(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategoryTerms_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetCategoryTermsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategoryTerms_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategoryTerms("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategoryTerms_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoryTermsAsync("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategoryTerms_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetCategoryTerms("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategoryTerms_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetCategoryTermsAsync("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateTerm_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.CreateTerm(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateTerm_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.CreateTermAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateTerm_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); + Response response = client.CreateTerm(atlasGlossaryTerm); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateTerm_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); + Response response = await client.CreateTermAsync(atlasGlossaryTerm); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateTerm_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { +new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +name = "", +displayText = "", +itemPath = "", +resourceId = "", +properties = new +{ +key = new object(), +}, +} + }, + resources = new object[] + { +new +{ +displayName = "", +url = "", +} + }, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} + }, + categories = new object[] + { +new +{ +categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +description = "", +displayText = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DRAFT", +} + }, + classifies = new object[] + { +null + }, + examples = new object[] + { +"" + }, + isA = new object[] + { +null + }, + preferredTerms = new object[] + { +null + }, + preferredToTerms = new object[] + { +null + }, + replacedBy = new object[] + { +null + }, + replacementTerms = new object[] + { +null + }, + seeAlso = new object[] + { +null + }, + synonyms = new object[] + { +null + }, + translatedTerms = new object[] + { +null + }, + translationTerms = new object[] + { +null + }, + usage = "", + validValues = new object[] + { +null + }, + validValuesFor = new object[] + { +null + }, + }); + Response response = client.CreateTerm(content, includeTermHierarchy: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateTerm_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { +new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +name = "", +displayText = "", +itemPath = "", +resourceId = "", +properties = new +{ +key = new object(), +}, +} + }, + resources = new object[] + { +new +{ +displayName = "", +url = "", +} + }, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} + }, + categories = new object[] + { +new +{ +categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +description = "", +displayText = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DRAFT", +} + }, + classifies = new object[] + { +null + }, + examples = new object[] + { +"" + }, + isA = new object[] + { +null + }, + preferredTerms = new object[] + { +null + }, + preferredToTerms = new object[] + { +null + }, + replacedBy = new object[] + { +null + }, + replacementTerms = new object[] + { +null + }, + seeAlso = new object[] + { +null + }, + synonyms = new object[] + { +null + }, + translatedTerms = new object[] + { +null + }, + translationTerms = new object[] + { +null + }, + usage = "", + validValues = new object[] + { +null + }, + validValuesFor = new object[] + { +null + }, + }); + Response response = await client.CreateTermAsync(content, includeTermHierarchy: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateTerm_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Name = "", +DisplayText = "", +ItemPath = "", +ResourceId = "", +Properties = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +}}, + Resources = {new ResourceLink +{ +DisplayName = "", +Url = "", +}}, + Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, + Attributes = +{ +["key"] = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +} +}, + AssignedEntities = {new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +}}, + Categories = {new AtlasTermCategorizationHeader +{ +CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Description = "", +DisplayText = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermRelationshipStatus.Draft, +}}, + Classifies = { default }, + Examples = { "" }, + IsA = { default }, + PreferredTerms = { default }, + PreferredToTerms = { default }, + ReplacedBy = { default }, + ReplacementTerms = { default }, + SeeAlso = { default }, + Synonyms = { default }, + TranslatedTerms = { default }, + TranslationTerms = { default }, + Usage = "", + ValidValues = { default }, + ValidValuesFor = { default }, + }; + Response response = client.CreateTerm(atlasGlossaryTerm, includeTermHierarchy: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateTerm_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Name = "", +DisplayText = "", +ItemPath = "", +ResourceId = "", +Properties = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +}}, + Resources = {new ResourceLink +{ +DisplayName = "", +Url = "", +}}, + Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, + Attributes = +{ +["key"] = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +} +}, + AssignedEntities = {new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +}}, + Categories = {new AtlasTermCategorizationHeader +{ +CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Description = "", +DisplayText = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermRelationshipStatus.Draft, +}}, + Classifies = { default }, + Examples = { "" }, + IsA = { default }, + PreferredTerms = { default }, + PreferredToTerms = { default }, + ReplacedBy = { default }, + ReplacementTerms = { default }, + SeeAlso = { default }, + Synonyms = { default }, + TranslatedTerms = { default }, + TranslationTerms = { default }, + Usage = "", + ValidValues = { default }, + ValidValuesFor = { default }, + }; + Response response = await client.CreateTermAsync(atlasGlossaryTerm, includeTermHierarchy: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTerm_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetTerm("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTerm_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetTermAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTerm_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetTerm(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTerm_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetTermAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTerm_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = client.GetTerm("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTerm_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = await client.GetTermAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTerm_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = client.GetTerm(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTerm_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = await client.GetTermAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_UpdateTerm_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateTerm("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_UpdateTerm_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateTermAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_UpdateTerm_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); + Response response = client.UpdateTerm("", atlasGlossaryTerm); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_UpdateTerm_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); + Response response = await client.UpdateTermAsync("", atlasGlossaryTerm); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_UpdateTerm_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { +new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +name = "", +displayText = "", +itemPath = "", +resourceId = "", +properties = new +{ +key = new object(), +}, +} + }, + resources = new object[] + { +new +{ +displayName = "", +url = "", +} + }, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} + }, + categories = new object[] + { +new +{ +categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +description = "", +displayText = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DRAFT", +} + }, + classifies = new object[] + { +null + }, + examples = new object[] + { +"" + }, + isA = new object[] + { +null + }, + preferredTerms = new object[] + { +null + }, + preferredToTerms = new object[] + { +null + }, + replacedBy = new object[] + { +null + }, + replacementTerms = new object[] + { +null + }, + seeAlso = new object[] + { +null + }, + synonyms = new object[] + { +null + }, + translatedTerms = new object[] + { +null + }, + translationTerms = new object[] + { +null + }, + usage = "", + validValues = new object[] + { +null + }, + validValuesFor = new object[] + { +null + }, + }); + Response response = client.UpdateTerm("", content, includeTermHierarchy: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_UpdateTerm_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + abbreviation = "", + templateName = new object[] + { +new object() + }, + anchor = new + { + displayText = "", + glossaryGuid = "", + relationGuid = "", + }, + antonyms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + status = "Draft", + nickName = "", + hierarchyInfo = new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +name = "", +displayText = "", +itemPath = "", +resourceId = "", +properties = new +{ +key = new object(), +}, +} + }, + resources = new object[] + { +new +{ +displayName = "", +url = "", +} + }, + contacts = new + { + key = new object[] + { +new +{ +id = "", +info = "", +} + }, + }, + attributes = new + { + key = new + { + key = new object(), + }, + }, + assignedEntities = new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} + }, + categories = new object[] + { +new +{ +categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +description = "", +displayText = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DRAFT", +} + }, + classifies = new object[] + { +null + }, + examples = new object[] + { +"" + }, + isA = new object[] + { +null + }, + preferredTerms = new object[] + { +null + }, + preferredToTerms = new object[] + { +null + }, + replacedBy = new object[] + { +null + }, + replacementTerms = new object[] + { +null + }, + seeAlso = new object[] + { +null + }, + synonyms = new object[] + { +null + }, + translatedTerms = new object[] + { +null + }, + translationTerms = new object[] + { +null + }, + usage = "", + validValues = new object[] + { +null + }, + validValuesFor = new object[] + { +null + }, + }); + Response response = await client.UpdateTermAsync("", content, includeTermHierarchy: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_UpdateTerm_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Name = "", +DisplayText = "", +ItemPath = "", +ResourceId = "", +Properties = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +}}, + Resources = {new ResourceLink +{ +DisplayName = "", +Url = "", +}}, + Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, + Attributes = +{ +["key"] = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +} +}, + AssignedEntities = {new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +}}, + Categories = {new AtlasTermCategorizationHeader +{ +CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Description = "", +DisplayText = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermRelationshipStatus.Draft, +}}, + Classifies = { default }, + Examples = { "" }, + IsA = { default }, + PreferredTerms = { default }, + PreferredToTerms = { default }, + ReplacedBy = { default }, + ReplacementTerms = { default }, + SeeAlso = { default }, + Synonyms = { default }, + TranslatedTerms = { default }, + TranslationTerms = { default }, + Usage = "", + ValidValues = { default }, + ValidValuesFor = { default }, + }; + Response response = client.UpdateTerm("", atlasGlossaryTerm, includeTermHierarchy: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_UpdateTerm_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Abbreviation = "", + TemplateName = { BinaryData.FromObjectAsJson(new object()) }, + Anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }, + Antonyms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + Status = TermStatus.Draft, + NickName = "", + HierarchyInfo = {new PurviewObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Name = "", +DisplayText = "", +ItemPath = "", +ResourceId = "", +Properties = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +}}, + Resources = {new ResourceLink +{ +DisplayName = "", +Url = "", +}}, + Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, + Attributes = +{ +["key"] = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +} +}, + AssignedEntities = {new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +}}, + Categories = {new AtlasTermCategorizationHeader +{ +CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Description = "", +DisplayText = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermRelationshipStatus.Draft, +}}, + Classifies = { default }, + Examples = { "" }, + IsA = { default }, + PreferredTerms = { default }, + PreferredToTerms = { default }, + ReplacedBy = { default }, + ReplacementTerms = { default }, + SeeAlso = { default }, + Synonyms = { default }, + TranslatedTerms = { default }, + TranslationTerms = { default }, + Usage = "", + ValidValues = { default }, + ValidValuesFor = { default }, + }; + Response response = await client.UpdateTermAsync("", atlasGlossaryTerm, includeTermHierarchy: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DeleteTerm_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.DeleteTerm(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DeleteTerm_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DeleteTermAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DeleteTerm_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.DeleteTerm(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DeleteTerm_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DeleteTermAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdateTerm_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = client.PartialUpdateTerm("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdateTerm_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = await client.PartialUpdateTermAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdateTerm_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.PartialUpdateTerm("", new Dictionary + { + ["key"] = "" + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdateTerm_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.PartialUpdateTermAsync("", new Dictionary + { + ["key"] = "" + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdateTerm_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = client.PartialUpdateTerm("", content, includeTermHierarchy: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdateTerm_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = await client.PartialUpdateTermAsync("", content, includeTermHierarchy: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdateTerm_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = client.PartialUpdateTerm("", new Dictionary + { + ["key"] = "" + }, includeTermHierarchy: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdateTerm_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = await client.PartialUpdateTermAsync("", new Dictionary + { + ["key"] = "" + }, includeTermHierarchy: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateTerms_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = client.CreateTerms(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateTerms_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = await client.CreateTermsAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateTerms_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.CreateTerms(new AtlasGlossaryTerm[] + { +new AtlasGlossaryTerm() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateTerms_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.CreateTermsAsync(new AtlasGlossaryTerm[] + { +new AtlasGlossaryTerm() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateTerms_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "", +classifications = new object[] +{ +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} +}, +longDescription = "", +name = "", +qualifiedName = "", +shortDescription = "", +lastModifiedTS = "", +createTime = 1234L, +createdBy = "", +updateTime = 1234L, +updatedBy = "", +abbreviation = "", +templateName = new object[] +{ +new object() +}, +anchor = new +{ +displayText = "", +glossaryGuid = "", +relationGuid = "", +}, +antonyms = new object[] +{ +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} +}, +status = "Draft", +nickName = "", +hierarchyInfo = new object[] +{ +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +name = "", +displayText = "", +itemPath = "", +resourceId = "", +properties = new +{ +key = new object(), +}, +} +}, +resources = new object[] +{ +new +{ +displayName = "", +url = "", +} +}, +contacts = new +{ +key = new object[] +{ +new +{ +id = "", +info = "", +} +}, +}, +attributes = new +{ +key = new +{ +key = new object(), +}, +}, +assignedEntities = new object[] +{ +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} +}, +categories = new object[] +{ +new +{ +categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +description = "", +displayText = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DRAFT", +} +}, +classifies = new object[] +{ +null +}, +examples = new object[] +{ +"" +}, +isA = new object[] +{ +null +}, +preferredTerms = new object[] +{ +null +}, +preferredToTerms = new object[] +{ +null +}, +replacedBy = new object[] +{ +null +}, +replacementTerms = new object[] +{ +null +}, +seeAlso = new object[] +{ +null +}, +synonyms = new object[] +{ +null +}, +translatedTerms = new object[] +{ +null +}, +translationTerms = new object[] +{ +null +}, +usage = "", +validValues = new object[] +{ +null +}, +validValuesFor = new object[] +{ +null +}, +} + }); + Response response = client.CreateTerms(content, includeTermHierarchy: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); + Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("nickName").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("usage").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateTerms_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "", +classifications = new object[] +{ +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} +}, +longDescription = "", +name = "", +qualifiedName = "", +shortDescription = "", +lastModifiedTS = "", +createTime = 1234L, +createdBy = "", +updateTime = 1234L, +updatedBy = "", +abbreviation = "", +templateName = new object[] +{ +new object() +}, +anchor = new +{ +displayText = "", +glossaryGuid = "", +relationGuid = "", +}, +antonyms = new object[] +{ +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} +}, +status = "Draft", +nickName = "", +hierarchyInfo = new object[] +{ +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +name = "", +displayText = "", +itemPath = "", +resourceId = "", +properties = new +{ +key = new object(), +}, +} +}, +resources = new object[] +{ +new +{ +displayName = "", +url = "", +} +}, +contacts = new +{ +key = new object[] +{ +new +{ +id = "", +info = "", +} +}, +}, +attributes = new +{ +key = new +{ +key = new object(), +}, +}, +assignedEntities = new object[] +{ +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} +}, +categories = new object[] +{ +new +{ +categoryGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +description = "", +displayText = "", +relationGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +status = "DRAFT", +} +}, +classifies = new object[] +{ +null +}, +examples = new object[] +{ +"" +}, +isA = new object[] +{ +null +}, +preferredTerms = new object[] +{ +null +}, +preferredToTerms = new object[] +{ +null +}, +replacedBy = new object[] +{ +null +}, +replacementTerms = new object[] +{ +null +}, +seeAlso = new object[] +{ +null +}, +synonyms = new object[] +{ +null +}, +translatedTerms = new object[] +{ +null +}, +translationTerms = new object[] +{ +null +}, +usage = "", +validValues = new object[] +{ +null +}, +validValuesFor = new object[] +{ +null +}, +} + }); + Response response = await client.CreateTermsAsync(content, includeTermHierarchy: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); + Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("nickName").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("usage").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_CreateTerms_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response> response = client.CreateTerms(new AtlasGlossaryTerm[] + { +new AtlasGlossaryTerm +{ +Guid = "", +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +LongDescription = "", +Name = "", +QualifiedName = "", +ShortDescription = "", +LastModifiedTS = "", +CreateTime = 1234L, +CreatedBy = "", +UpdateTime = 1234L, +UpdatedBy = "", +Abbreviation = "", +TemplateName = {BinaryData.FromObjectAsJson(new object())}, +Anchor = new AtlasGlossaryHeader +{ +DisplayText = "", +GlossaryGuid = "", +RelationGuid = "", +}, +Antonyms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, +Status = TermStatus.Draft, +NickName = "", +HierarchyInfo = {new PurviewObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Name = "", +DisplayText = "", +ItemPath = "", +ResourceId = "", +Properties = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +}}, +Resources = {new ResourceLink +{ +DisplayName = "", +Url = "", +}}, +Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, +Attributes = +{ +["key"] = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +} +}, +AssignedEntities = {new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +}}, +Categories = {new AtlasTermCategorizationHeader +{ +CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Description = "", +DisplayText = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermRelationshipStatus.Draft, +}}, +Classifies = {default}, +Examples = {""}, +IsA = {default}, +PreferredTerms = {default}, +PreferredToTerms = {default}, +ReplacedBy = {default}, +ReplacementTerms = {default}, +SeeAlso = {default}, +Synonyms = {default}, +TranslatedTerms = {default}, +TranslationTerms = {default}, +Usage = "", +ValidValues = {default}, +ValidValuesFor = {default}, +} + }, includeTermHierarchy: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_CreateTerms_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response> response = await client.CreateTermsAsync(new AtlasGlossaryTerm[] + { +new AtlasGlossaryTerm +{ +Guid = "", +Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, +LongDescription = "", +Name = "", +QualifiedName = "", +ShortDescription = "", +LastModifiedTS = "", +CreateTime = 1234L, +CreatedBy = "", +UpdateTime = 1234L, +UpdatedBy = "", +Abbreviation = "", +TemplateName = {BinaryData.FromObjectAsJson(new object())}, +Anchor = new AtlasGlossaryHeader +{ +DisplayText = "", +GlossaryGuid = "", +RelationGuid = "", +}, +Antonyms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, +Status = TermStatus.Draft, +NickName = "", +HierarchyInfo = {new PurviewObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +Name = "", +DisplayText = "", +ItemPath = "", +ResourceId = "", +Properties = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +}}, +Resources = {new ResourceLink +{ +DisplayName = "", +Url = "", +}}, +Contacts = +{ +["key"] = {new ContactInfo +{ +Id = "", +Info = "", +}} +}, +Attributes = +{ +["key"] = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +} +}, +AssignedEntities = {new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +}}, +Categories = {new AtlasTermCategorizationHeader +{ +CategoryGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Description = "", +DisplayText = "", +RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +Status = AtlasTermRelationshipStatus.Draft, +}}, +Classifies = {default}, +Examples = {""}, +IsA = {default}, +PreferredTerms = {default}, +PreferredToTerms = {default}, +ReplacedBy = {default}, +ReplacementTerms = {default}, +SeeAlso = {default}, +Synonyms = {default}, +TranslatedTerms = {default}, +TranslationTerms = {default}, +Usage = "", +ValidValues = {default}, +ValidValuesFor = {default}, +} + }, includeTermHierarchy: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetEntitiesAssignedWithTerm_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetEntitiesAssignedWithTerm("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetEntitiesAssignedWithTerm_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetEntitiesAssignedWithTermAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetEntitiesAssignedWithTerm_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetEntitiesAssignedWithTerm(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetEntitiesAssignedWithTerm_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetEntitiesAssignedWithTermAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetEntitiesAssignedWithTerm_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetEntitiesAssignedWithTerm("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetEntitiesAssignedWithTerm_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetEntitiesAssignedWithTermAsync("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetEntitiesAssignedWithTerm_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetEntitiesAssignedWithTerm("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetEntitiesAssignedWithTerm_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetEntitiesAssignedWithTermAsync("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_AssignTermToEntities_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = client.AssignTermToEntities("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_AssignTermToEntities_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = await client.AssignTermToEntitiesAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_AssignTermToEntities_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.AssignTermToEntities("", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_AssignTermToEntities_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.AssignTermToEntitiesAsync("", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_AssignTermToEntities_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} + }); + Response response = client.AssignTermToEntities("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_AssignTermToEntities_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} + }); + Response response = await client.AssignTermToEntitiesAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_AssignTermToEntities_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.AssignTermToEntities("", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_AssignTermToEntities_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.AssignTermToEntitiesAsync("", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DeleteTermAssignmentFromEntities_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = client.DeleteTermAssignmentFromEntities("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DeleteTermAssignmentFromEntities_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new object() + }); + Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DeleteTermAssignmentFromEntities_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.DeleteTermAssignmentFromEntities("", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DeleteTermAssignmentFromEntities_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId() + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DeleteTermAssignmentFromEntities_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} + }); + Response response = client.DeleteTermAssignmentFromEntities("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DeleteTermAssignmentFromEntities_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object[] + { +new +{ +guid = "", +typeName = "", +uniqueAttributes = new +{ +key = new object(), +}, +displayText = "", +entityStatus = "ACTIVE", +relationshipType = "", +relationshipAttributes = new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +}, +relationshipGuid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +relationshipStatus = "ACTIVE", +} + }); + Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DeleteTermAssignmentFromEntities_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.DeleteTermAssignmentFromEntities("", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DeleteTermAssignmentFromEntities_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DeleteTermAssignmentFromEntitiesAsync("", new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId +{ +Guid = "", +TypeName = "", +UniqueAttributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +DisplayText = "", +EntityStatus = EntityStatus.Active, +RelationshipType = "", +RelationshipAttributes = new AtlasStruct +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +}, +RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), +RelationshipStatus = StatusAtlasRelationship.Active, +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetRelatedTerms_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetRelatedTerms("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetRelatedTerms_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetRelatedTermsAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetRelatedTerms_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response>> response = client.GetRelatedTerms(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetRelatedTerms_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response>> response = await client.GetRelatedTermsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetRelatedTerms_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = client.GetRelatedTerms("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetRelatedTerms_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = await client.GetRelatedTermsAsync("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetRelatedTerms_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response>> response = client.GetRelatedTerms("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetRelatedTerms_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response>> response = await client.GetRelatedTermsAsync("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetGlossary_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetGlossary("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetGlossary_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetGlossaryAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetGlossary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetGlossary(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetGlossary_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetGlossaryAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetGlossary_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetGlossary("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetGlossary_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetGlossaryAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetGlossary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetGlossary(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetGlossary_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetGlossaryAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Update_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.Update("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Update_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Update_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossary atlasGlossary = new AtlasGlossary(); + Response response = client.Update("", atlasGlossary); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Update_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + AtlasGlossary atlasGlossary = new AtlasGlossary(); + Response response = await client.UpdateAsync("", atlasGlossary); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Update_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + categories = new object[] + { +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} + }, + language = "", + terms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + usage = "", + }); + Response response = client.Update("", content, ignoreTermsAndCategories: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Update_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + guid = "", + classifications = new object[] + { +new +{ +attributes = new +{ +key = new object(), +}, +typeName = "", +lastModifiedTS = "", +entityGuid = "", +entityStatus = "ACTIVE", +removePropagationsOnEntityDelete = true, +validityPeriods = new object[] +{ +new +{ +endTime = "", +startTime = "", +timeZone = "", +} +}, +} + }, + longDescription = "", + name = "", + qualifiedName = "", + shortDescription = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + updateTime = 1234L, + updatedBy = "", + categories = new object[] + { +new +{ +categoryGuid = "", +description = "", +displayText = "", +parentCategoryGuid = "", +relationGuid = "", +} + }, + language = "", + terms = new object[] + { +new +{ +description = "", +displayText = "", +expression = "", +relationGuid = "", +status = "DRAFT", +steward = "", +termGuid = "", +} + }, + usage = "", + }); + Response response = await client.UpdateAsync("", content, ignoreTermsAndCategories: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Update_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + AtlasGlossary atlasGlossary = new AtlasGlossary + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Categories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, + Language = "", + Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + Usage = "", + }; + Response response = client.Update("", atlasGlossary, ignoreTermsAndCategories: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Update_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + AtlasGlossary atlasGlossary = new AtlasGlossary + { + Guid = "", + Classifications = {new AtlasClassification +{ +Attributes = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, +TypeName = "", +LastModifiedTS = "", +EntityGuid = "", +EntityStatus = EntityStatus.Active, +RemovePropagationsOnEntityDelete = true, +ValidityPeriods = {new TimeBoundary +{ +EndTime = "", +StartTime = "", +TimeZone = "", +}}, +}}, + LongDescription = "", + Name = "", + QualifiedName = "", + ShortDescription = "", + LastModifiedTS = "", + CreateTime = 1234L, + CreatedBy = "", + UpdateTime = 1234L, + UpdatedBy = "", + Categories = {new AtlasRelatedCategoryHeader +{ +CategoryGuid = "", +Description = "", +DisplayText = "", +ParentCategoryGuid = "", +RelationGuid = "", +}}, + Language = "", + Terms = {new AtlasRelatedTermHeader +{ +Description = "", +DisplayText = "", +Expression = "", +RelationGuid = "", +Status = AtlasTermRelationshipStatus.Draft, +Steward = "", +TermGuid = "", +}}, + Usage = "", + }; + Response response = await client.UpdateAsync("", atlasGlossary, ignoreTermsAndCategories: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Delete_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.Delete(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Delete_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DeleteAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_Delete_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.Delete(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_Delete_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DeleteAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategories_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategories("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategories_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoriesAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategories_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetCategories(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategories_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetCategoriesAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategories_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategories("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategories_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoriesAsync("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategories_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetCategories("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategories_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetCategoriesAsync("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategoriesHeaders_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategoriesHeaders("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategoriesHeaders_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoriesHeadersAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategoriesHeaders_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetCategoriesHeaders(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategoriesHeaders_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetCategoriesHeadersAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategoriesHeaders_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetCategoriesHeaders("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategoriesHeaders_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetCategoriesHeadersAsync("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetCategoriesHeaders_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetCategoriesHeaders("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetCategoriesHeaders_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetCategoriesHeadersAsync("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetDetailed_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetDetailed("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetDetailed_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetDetailedAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetDetailed_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetDetailed(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetDetailed_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetDetailedAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetDetailed_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = client.GetDetailed("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetDetailed_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = await client.GetDetailedAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("childrenCategories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("parentCategory").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("categoryInfo").GetProperty("").GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("abbreviation").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("templateName")[0].ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("nickName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("examples")[0].ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("usage").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("termInfo").GetProperty("").GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetDetailed_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = client.GetDetailed(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetDetailed_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = await client.GetDetailedAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdate_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = client.PartialUpdate("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdate_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = await client.PartialUpdateAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdate_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.PartialUpdate("", new Dictionary + { + ["key"] = "" + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdate_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.PartialUpdateAsync("", new Dictionary + { + ["key"] = "" + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdate_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = client.PartialUpdate("", content, ignoreTermsAndCategories: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdate_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + using RequestContent content = RequestContent.Create(new + { + key = "", + }); + Response response = await client.PartialUpdateAsync("", content, ignoreTermsAndCategories: true); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("longDescription").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("qualifiedName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("createTime").ToString()); + Console.WriteLine(result.GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("updateTime").ToString()); + Console.WriteLine(result.GetProperty("updatedBy").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_PartialUpdate_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = client.PartialUpdate("", new Dictionary + { + ["key"] = "" + }, ignoreTermsAndCategories: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_PartialUpdate_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = await client.PartialUpdateAsync("", new Dictionary + { + ["key"] = "" + }, ignoreTermsAndCategories: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTerms_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetTerms("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTerms_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetTermsAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTerms_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetTerms(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTerms_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetTermsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTerms_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = client.GetTerms("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); + Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("nickName").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("usage").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTerms_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response response = await client.GetTermsAsync("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result[0].GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result[0].GetProperty("longDescription").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("qualifiedName").ToString()); + Console.WriteLine(result[0].GetProperty("shortDescription").ToString()); + Console.WriteLine(result[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("createTime").ToString()); + Console.WriteLine(result[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result[0].GetProperty("updateTime").ToString()); + Console.WriteLine(result[0].GetProperty("updatedBy").ToString()); + Console.WriteLine(result[0].GetProperty("abbreviation").ToString()); + Console.WriteLine(result[0].GetProperty("templateName")[0].ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("glossaryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("anchor").GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("antonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("nickName").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result[0].GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("resources")[0].GetProperty("url").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("id").ToString()); + Console.WriteLine(result[0].GetProperty("contacts").GetProperty("")[0].GetProperty("info").ToString()); + Console.WriteLine(result[0].GetProperty("attributes").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("guid").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString()); + Console.WriteLine(result[0].GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("categoryGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("classifies")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("examples")[0].ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("isA")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("replacedBy")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("seeAlso")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("synonyms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("translationTerms")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("usage").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("validValues")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTerms_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response> response = client.GetTerms("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTerms_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); + + Response> response = await client.GetTermsAsync("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTermHeaders_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetTermHeaders("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTermHeaders_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetTermHeadersAsync("", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTermHeaders_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetTermHeaders(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTermHeaders_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetTermHeadersAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTermHeaders_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = client.GetTermHeaders("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTermHeaders_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.GetTermHeadersAsync("", 1234, 1234, "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("displayText").ToString()); + Console.WriteLine(result[0].GetProperty("expression").ToString()); + Console.WriteLine(result[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result[0].GetProperty("status").ToString()); + Console.WriteLine(result[0].GetProperty("steward").ToString()); + Console.WriteLine(result[0].GetProperty("termGuid").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_GetTermHeaders_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = client.GetTermHeaders("", limit: 1234, offset: 1234, sort: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_GetTermHeaders_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); + + Response> response = await client.GetTermHeadersAsync("", limit: 1234, offset: 1234, sort: ""); + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Lineage.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Lineage.cs new file mode 100644 index 0000000000000..4530bacaec43e --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Lineage.cs @@ -0,0 +1,555 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Purview.DataMap; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.Purview.DataMap.Samples +{ + public partial class Samples_Lineage + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetLineage_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = client.GetLineage("", "INPUT"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetLineage_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = await client.GetLineageAsync("", "INPUT"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetLineage_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = client.GetLineage("", LineageDirection.Input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetLineage_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = await client.GetLineageAsync("", LineageDirection.Input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetLineage_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = client.GetLineage("", "INPUT", depth: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("lineageDepth").ToString()); + Console.WriteLine(result.GetProperty("lineageWidth").ToString()); + Console.WriteLine(result.GetProperty("childrenCount").ToString()); + Console.WriteLine(result.GetProperty("lineageDirection").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetLineage_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = await client.GetLineageAsync("", "INPUT", depth: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("lineageDepth").ToString()); + Console.WriteLine(result.GetProperty("lineageWidth").ToString()); + Console.WriteLine(result.GetProperty("childrenCount").ToString()); + Console.WriteLine(result.GetProperty("lineageDirection").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetLineage_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = client.GetLineage("", LineageDirection.Input, depth: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetLineage_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = await client.GetLineageAsync("", LineageDirection.Input, depth: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetNextPage_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + + Response response = client.GetNextPage("", "INPUT"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetNextPage_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + + Response response = await client.GetNextPageAsync("", "INPUT"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetNextPage_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + + Response response = client.GetNextPage("", LineageDirection.Input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetNextPage_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + + Response response = await client.GetNextPageAsync("", LineageDirection.Input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetNextPage_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + + Response response = client.GetNextPage("", "INPUT", offset: 1234, limit: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("lineageDepth").ToString()); + Console.WriteLine(result.GetProperty("lineageWidth").ToString()); + Console.WriteLine(result.GetProperty("childrenCount").ToString()); + Console.WriteLine(result.GetProperty("lineageDirection").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetNextPage_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + + Response response = await client.GetNextPageAsync("", "INPUT", offset: 1234, limit: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("lineageDepth").ToString()); + Console.WriteLine(result.GetProperty("lineageWidth").ToString()); + Console.WriteLine(result.GetProperty("childrenCount").ToString()); + Console.WriteLine(result.GetProperty("lineageDirection").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetNextPage_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + + Response response = client.GetNextPage("", LineageDirection.Input, offset: 1234, limit: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetNextPage_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(apiVersion: "2023-09-01"); + + Response response = await client.GetNextPageAsync("", LineageDirection.Input, offset: 1234, limit: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetByUniqueAttribute_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = client.GetByUniqueAttribute("", "INPUT"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetByUniqueAttribute_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = await client.GetByUniqueAttributeAsync("", "INPUT"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetByUniqueAttribute_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = client.GetByUniqueAttribute("", LineageDirection.Input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetByUniqueAttribute_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = await client.GetByUniqueAttributeAsync("", LineageDirection.Input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetByUniqueAttribute_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = client.GetByUniqueAttribute("", "INPUT", depth: 1234, attribute: ""); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("lineageDepth").ToString()); + Console.WriteLine(result.GetProperty("lineageWidth").ToString()); + Console.WriteLine(result.GetProperty("childrenCount").ToString()); + Console.WriteLine(result.GetProperty("lineageDirection").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetByUniqueAttribute_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = await client.GetByUniqueAttributeAsync("", "INPUT", depth: 1234, attribute: ""); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("baseEntityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classificationNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("attributes").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("typeName").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("entityStatus").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("guid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("isIncomplete").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meaningNames")[0].ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("confidence").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("createdBy").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("displayText").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("expression").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("relationGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("steward").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("meanings")[0].GetProperty("termGuid").ToString()); + Console.WriteLine(result.GetProperty("guidEntityMap").GetProperty("").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("widthCounts").GetProperty("").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("lineageDepth").ToString()); + Console.WriteLine(result.GetProperty("lineageWidth").ToString()); + Console.WriteLine(result.GetProperty("childrenCount").ToString()); + Console.WriteLine(result.GetProperty("lineageDirection").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("childEntityId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("parentRelations")[0].GetProperty("parentEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("fromEntityId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("relationshipId").ToString()); + Console.WriteLine(result.GetProperty("relations")[0].GetProperty("toEntityId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Lineage_GetByUniqueAttribute_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = client.GetByUniqueAttribute("", LineageDirection.Input, depth: 1234, attribute: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Lineage_GetByUniqueAttribute_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Lineage client = new DataMapClient(endpoint, credential).GetLineageClient(); + + Response response = await client.GetByUniqueAttributeAsync("", LineageDirection.Input, depth: 1234, attribute: ""); + } + } +} diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs new file mode 100644 index 0000000000000..2677ff1007279 --- /dev/null +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs @@ -0,0 +1,773 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Purview.DataMap; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.Purview.DataMap.Samples +{ + public partial class Samples_Relationship + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Relationship_Create_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.Create(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Relationship_Create_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.CreateAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Relationship_Create_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + + AtlasRelationship atlasRelationship = new AtlasRelationship(); + Response response = client.Create(atlasRelationship); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Relationship_Create_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + + AtlasRelationship atlasRelationship = new AtlasRelationship(); + Response response = await client.CreateAsync(atlasRelationship); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Relationship_Create_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); + + using RequestContent content = RequestContent.Create(new + { + attributes = new + { + key = new object(), + }, + typeName = "", + lastModifiedTS = "", + createTime = 1234L, + createdBy = "", + end1 = new + { + guid = "", + typeName = "", + uniqueAttributes = new + { + key = new object(), + }, + }, + guid = "", + homeId = "", + label = "