From d857dd093eff771af3129bfe227032a554e1834b Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 11 Jul 2024 07:19:37 +0000 Subject: [PATCH 1/7] Update Generator Version 3.0.0-beta.20240710.2 --- eng/Packages.Data.props | 2 +- eng/emitter-package-lock.json | 27 +++++++++++++-------------- eng/emitter-package.json | 4 ++-- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index f80f11bd68f97..af791ece308a5 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -226,7 +226,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index a071be113dd33..c8e923c612a90 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,14 +5,14 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240707.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240710.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", "@azure-tools/typespec-azure-core": "0.43.0", "@azure-tools/typespec-azure-resource-manager": "0.43.0", "@azure-tools/typespec-azure-rulesets": "0.43.0", - "@azure-tools/typespec-client-generator-core": "0.43.1", + "@azure-tools/typespec-client-generator-core": "0.43.2", "@typespec/compiler": "0.57.0", "@typespec/http": "0.57.0", "@typespec/openapi": "0.57.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240707.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240707.1.tgz", - "integrity": "sha512-MjvNBR5H1Yzg3NvsBswDkTj8WXT2rcYPyNIgG6apwgEqUni+HXIUFMgTYFzpoS4A7uTHo+saPH7j4IBYADkpiQ==" + "version": "3.0.0-beta.20240710.2", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240710.2.tgz", + "integrity": "sha512-xFYWQjVKkid9PZRYPmch16S6SQqx094CFqMWS5T7/A3kPtXcu5IIPoyyhupaDxAZEHlEpQ70qaE/mNOlPX/acQ==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.43.0", @@ -96,9 +96,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.43.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.43.1.tgz", - "integrity": "sha512-NwNN/fIOcjOU/8o6ViCuEAAQl6zmu2X1QKPuXxeSy8ssDwrTiX9Ho2X/7IZM4XmOArKTtgmTkNcSnnmuj5dsGg==", + "version": "0.43.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.43.2.tgz", + "integrity": "sha512-UAVV30BtTQBiXmBoQ3SyvmiuBDYoqWFIn7G96hjojpwXpE6D5ba0y5LascMuF1b65eAhGnnf974DElJE9DGepQ==", "dev": true, "dependencies": { "change-case": "~5.4.4", @@ -112,16 +112,15 @@ "@typespec/compiler": "~0.57.0", "@typespec/http": "~0.57.0", "@typespec/rest": "~0.57.0", - "@typespec/versioning": "~0.57.0", - "@typespec/xml": "~0.57.0" + "@typespec/versioning": "~0.57.0" } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240707.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240707.1.tgz", - "integrity": "sha512-jYm+W5pLlqeKIRoOPGRQLoEhK6SG8eG1qhrBS8QEV8s12GyngVx1qxChjviArKlCM3xfqX82zLOkrG8iJ5hh6w==", + "version": "0.2.0-beta.20240710.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240710.2.tgz", + "integrity": "sha512-LYSWJ+vuvCjlahcGKPwrJR4uTRcJxzT7715LqDDSDQyH6RcPNVyIGOjjmlfj2AHBYI8bPnq6UgkjfecsUR2Drg==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240707.1", + "@autorest/csharp": "3.0.0-beta.20240710.2", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 5005c065b59b2..bfe498b005d83 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,14 +1,14 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240707.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240710.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", "@azure-tools/typespec-azure-core": "0.43.0", "@azure-tools/typespec-azure-resource-manager": "0.43.0", "@azure-tools/typespec-azure-rulesets": "0.43.0", - "@azure-tools/typespec-client-generator-core": "0.43.1", + "@azure-tools/typespec-client-generator-core": "0.43.2", "@typespec/compiler": "0.57.0", "@typespec/http": "0.57.0", "@typespec/openapi": "0.57.0", From 84cc2ff286b7448f84f087701957602d0e6aba41 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 11 Jul 2024 07:54:00 +0000 Subject: [PATCH 2/7] Update SDK codes de_he_2 --- .../AnalyticsDefenderEasmModelFactory.cs | 51 +-- .../AssetUpdatePayload.Serialization.cs | 2 +- .../src/Generated/AssetUpdatePayload.cs | 2 +- ...orerDataConnectionPayload.Serialization.cs | 2 +- .../AzureDataExplorerDataConnectionPayload.cs | 2 +- ...ureDataExplorerDataConnectionProperties.cs | 8 +- .../DataConnectionPayload.Serialization.cs | 2 +- .../src/Generated/DataConnectionPayload.cs | 2 +- .../src/Generated/DataConnectionProperties.cs | 2 +- .../DiscoveryGroupPayload.Serialization.cs | 2 +- .../src/Generated/DiscoveryGroupPayload.cs | 2 +- .../src/Generated/Docs/EasmClient.xml | 280 ++++-------- .../src/Generated/EasmClient.cs | 400 +++++++++++------- ...ticsDataConnectionPayload.Serialization.cs | 2 +- .../LogAnalyticsDataConnectionPayload.cs | 2 +- .../LogAnalyticsDataConnectionProperties.cs | 6 +- ...eportAssetSnapshotPayload.Serialization.cs | 2 +- .../Generated/ReportAssetSnapshotPayload.cs | 2 +- ...ReportAssetSummaryPayload.Serialization.cs | 2 +- .../Generated/ReportAssetSummaryPayload.cs | 2 +- .../SavedFilterPayload.Serialization.cs | 2 +- .../src/Generated/SavedFilterPayload.cs | 2 +- .../Generated/Samples/Samples_EasmClient.cs | 249 +++-------- .../src/Generated/Docs/FaceSessionClient.xml | 28 +- .../src/Generated/FaceSessionClient.cs | 123 ++++-- .../Samples/Samples_FaceSessionClient.cs | 24 +- .../src/Generated/CancerProfilingClient.cs | 36 +- .../Generated/Docs/CancerProfilingClient.xml | 52 +-- .../OncoPhenotypeData.Serialization.cs | 2 +- .../src/Generated/OncoPhenotypeData.cs | 2 +- .../Samples/Samples_CancerProfilingClient.cs | 48 +-- 31 files changed, 588 insertions(+), 755 deletions(-) diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs index 6333520b7dc23..3f1dbbb085619 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs @@ -2044,6 +2044,15 @@ public static LogAnalyticsDataConnection LogAnalyticsDataConnection(string id = properties); } + /// Initializes a new instance of . + /// log analytics api key. + /// log analytics workspace id. + /// A new instance for mocking. + public static LogAnalyticsDataConnectionProperties LogAnalyticsDataConnectionProperties(string apiKey = null, string workspaceId = null) + { + return new LogAnalyticsDataConnectionProperties(serializedAdditionalRawData: null, apiKey, workspaceId); + } + /// Initializes a new instance of . /// The system generated unique id for the resource. /// The caller provided unique name for the resource. @@ -2077,42 +2086,14 @@ public static AzureDataExplorerDataConnection AzureDataExplorerDataConnection(st properties); } - /// Initializes a new instance of . - /// The name of data connection. - /// The type of data the data connection will transfer. - /// The rate at which the data connection will receive updates. - /// The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). - /// properties. - /// A new instance for mocking. - public static LogAnalyticsDataConnectionPayload LogAnalyticsDataConnectionPayload(string name = null, DataConnectionContent? content = null, DataConnectionFrequency? frequency = null, int? frequencyOffset = null, LogAnalyticsDataConnectionProperties properties = null) - { - return new LogAnalyticsDataConnectionPayload( - "logAnalytics", - name, - content, - frequency, - frequencyOffset, - serializedAdditionalRawData: null, - properties); - } - - /// Initializes a new instance of . - /// The name of data connection. - /// The type of data the data connection will transfer. - /// The rate at which the data connection will receive updates. - /// The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). - /// properties. - /// A new instance for mocking. - public static AzureDataExplorerDataConnectionPayload AzureDataExplorerDataConnectionPayload(string name = null, DataConnectionContent? content = null, DataConnectionFrequency? frequency = null, int? frequencyOffset = null, AzureDataExplorerDataConnectionProperties properties = null) + /// Initializes a new instance of . + /// The azure data explorer cluster name. + /// The azure data explorer region. + /// The azure data explorer database name. + /// A new instance for mocking. + public static AzureDataExplorerDataConnectionProperties AzureDataExplorerDataConnectionProperties(string clusterName = null, string region = null, string databaseName = null) { - return new AzureDataExplorerDataConnectionPayload( - "azureDataExplorer", - name, - content, - frequency, - frequencyOffset, - serializedAdditionalRawData: null, - properties); + return new AzureDataExplorerDataConnectionProperties(serializedAdditionalRawData: null, clusterName, region, databaseName); } /// Initializes a new instance of . diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetUpdatePayload.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetUpdatePayload.Serialization.cs index 786a43b84cc6a..64c849ce580b5 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetUpdatePayload.Serialization.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetUpdatePayload.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Defender.Easm { - public partial class AssetUpdatePayload : IUtf8JsonSerializable, IJsonModel + internal partial class AssetUpdatePayload : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetUpdatePayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetUpdatePayload.cs index fd1c4c850a680..7880702a334fb 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetUpdatePayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetUpdatePayload.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Defender.Easm { /// A request body used to update an asset. - public partial class AssetUpdatePayload + internal partial class AssetUpdatePayload { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.Serialization.cs index a8a56a5721b83..b72dfb5dd48e3 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.Serialization.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Defender.Easm { - public partial class AzureDataExplorerDataConnectionPayload : IUtf8JsonSerializable, IJsonModel + internal partial class AzureDataExplorerDataConnectionPayload : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.cs index b98a0f227ee55..7930be74cabf9 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Defender.Easm { /// The AzureDataExplorerDataConnectionPayload. - public partial class AzureDataExplorerDataConnectionPayload : DataConnectionPayload + internal partial class AzureDataExplorerDataConnectionPayload : DataConnectionPayload { /// Initializes a new instance of . /// properties. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionProperties.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionProperties.cs index aee4e6da40275..0cd612a6551bc 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionProperties.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionProperties.cs @@ -14,7 +14,7 @@ namespace Azure.Analytics.Defender.Easm public partial class AzureDataExplorerDataConnectionProperties : DataConnectionProperties { /// Initializes a new instance of . - public AzureDataExplorerDataConnectionProperties() + internal AzureDataExplorerDataConnectionProperties() { } @@ -31,10 +31,10 @@ internal AzureDataExplorerDataConnectionProperties(IDictionary The azure data explorer cluster name. - public string ClusterName { get; set; } + public string ClusterName { get; } /// The azure data explorer region. - public string Region { get; set; } + public string Region { get; } /// The azure data explorer database name. - public string DatabaseName { get; set; } + public string DatabaseName { get; } } } diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.Serialization.cs index 4979ed8f82304..d107496eee4d1 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.Serialization.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Defender.Easm { [PersistableModelProxy(typeof(UnknownDataConnectionPayload))] - public partial class DataConnectionPayload : IUtf8JsonSerializable, IJsonModel + internal partial class DataConnectionPayload : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.cs index a10e83a8ee345..608c97199caf0 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.cs @@ -15,7 +15,7 @@ namespace Azure.Analytics.Defender.Easm /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - public abstract partial class DataConnectionPayload + internal abstract partial class DataConnectionPayload { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionProperties.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionProperties.cs index c5da5e294c569..4fe571d1a12b9 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionProperties.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionProperties.cs @@ -46,7 +46,7 @@ public partial class DataConnectionProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public DataConnectionProperties() + internal DataConnectionProperties() { } diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoveryGroupPayload.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoveryGroupPayload.Serialization.cs index 500f6f36f711b..714a3d97a6fc3 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoveryGroupPayload.Serialization.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoveryGroupPayload.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Defender.Easm { - public partial class DiscoveryGroupPayload : IUtf8JsonSerializable, IJsonModel + internal partial class DiscoveryGroupPayload : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoveryGroupPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoveryGroupPayload.cs index fe4d08b8765a5..9eff5852996f1 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoveryGroupPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoveryGroupPayload.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Defender.Easm { /// A request body used to create a discovery group. - public partial class DiscoveryGroupPayload + internal partial class DiscoveryGroupPayload { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml index 0852b588dd9ef..7b427044dbef1 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml @@ -1,7 +1,7 @@ - + This sample shows how to call UpdateAssetsAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(); -Response response = await client.UpdateAssetsAsync("", assetUpdatePayload); +Response response = await client.UpdateAssetsAsync(""); ]]> This sample shows how to call UpdateAssetsAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload +Response response = await client.UpdateAssetsAsync("", state: AssetUpdateState.Candidate, externalId: "", labels: new Dictionary { - State = AssetUpdateState.Candidate, - ExternalId = "", - Labels = - { - ["key"] = true - }, - Transfers = AssetUpdateTransfers.As, -}; -Response response = await client.UpdateAssetsAsync("", assetUpdatePayload); + ["key"] = true +}, transfers: AssetUpdateTransfers.As); ]]> - + This sample shows how to call UpdateAssets. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(); -Response response = client.UpdateAssets("", assetUpdatePayload); +Response response = client.UpdateAssets(""); ]]> This sample shows how to call UpdateAssets with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload +Response response = client.UpdateAssets("", state: AssetUpdateState.Candidate, externalId: "", labels: new Dictionary { - State = AssetUpdateState.Candidate, - ExternalId = "", - Labels = - { - ["key"] = true - }, - Transfers = AssetUpdateTransfers.As, -}; -Response response = client.UpdateAssets("", assetUpdatePayload); + ["key"] = true +}, transfers: AssetUpdateTransfers.As); ]]> @@ -271,7 +255,7 @@ Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToSt Console.WriteLine(result.GetProperty("reason").ToString()); ]]> - + This sample shows how to call ValidateDataConnectionAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = await client.ValidateDataConnectionAsync(dataConnectionPayload); +Response response = await client.ValidateDataConnectionAsync("logAnalytics"); ]]> This sample shows how to call ValidateDataConnectionAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties -{ - ApiKey = "", - WorkspaceId = "", -}) -{ - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, -}; -Response response = await client.ValidateDataConnectionAsync(dataConnectionPayload); +Response response = await client.ValidateDataConnectionAsync("logAnalytics", name: "", content: DataConnectionContent.Assets, frequency: DataConnectionFrequency.Daily, frequencyOffset: 1234); ]]> - + This sample shows how to call ValidateDataConnection. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = client.ValidateDataConnection(dataConnectionPayload); +Response response = client.ValidateDataConnection("logAnalytics"); ]]> This sample shows how to call ValidateDataConnection with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties -{ - ApiKey = "", - WorkspaceId = "", -}) -{ - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, -}; -Response response = client.ValidateDataConnection(dataConnectionPayload); +Response response = client.ValidateDataConnection("logAnalytics", name: "", content: DataConnectionContent.Assets, frequency: DataConnectionFrequency.Daily, frequencyOffset: 1234); ]]> @@ -539,7 +499,7 @@ Console.WriteLine(result.GetProperty("active").ToString()); Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); ]]> - + This sample shows how to call CreateOrReplaceDataConnectionAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = await client.CreateOrReplaceDataConnectionAsync("", dataConnectionPayload); +Response response = await client.CreateOrReplaceDataConnectionAsync("", "logAnalytics"); ]]> This sample shows how to call CreateOrReplaceDataConnectionAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties -{ - ApiKey = "", - WorkspaceId = "", -}) -{ - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, -}; -Response response = await client.CreateOrReplaceDataConnectionAsync("", dataConnectionPayload); +Response response = await client.CreateOrReplaceDataConnectionAsync("", "logAnalytics", name: "", content: DataConnectionContent.Assets, frequency: DataConnectionFrequency.Daily, frequencyOffset: 1234); ]]> - + This sample shows how to call CreateOrReplaceDataConnection. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = client.CreateOrReplaceDataConnection("", dataConnectionPayload); +Response response = client.CreateOrReplaceDataConnection("", "logAnalytics"); ]]> This sample shows how to call CreateOrReplaceDataConnection with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties -{ - ApiKey = "", - WorkspaceId = "", -}) -{ - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, -}; -Response response = client.CreateOrReplaceDataConnection("", dataConnectionPayload); +Response response = client.CreateOrReplaceDataConnection("", "logAnalytics", name: "", content: DataConnectionContent.Assets, frequency: DataConnectionFrequency.Daily, frequencyOffset: 1234); ]]> @@ -757,7 +693,7 @@ Response response = client.DeleteDataConnection(""); Console.WriteLine(response.Status); ]]> - + This sample shows how to call ValidateDiscoveryGroupAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); -Response response = await client.ValidateDiscoveryGroupAsync(discoveryGroupPayload); +Response response = await client.ValidateDiscoveryGroupAsync(); ]]> This sample shows how to call ValidateDiscoveryGroupAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload +Response response = await client.ValidateDiscoveryGroupAsync(name: "", description: "", tier: "", frequencyMilliseconds: 1234L, seeds: new DiscoverySource[] { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource + new DiscoverySource { Kind = DiscoverySourceKind.As, Name = "", - }}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", -}; -Response response = await client.ValidateDiscoveryGroupAsync(discoveryGroupPayload); + } +}, names: new string[] { "" }, excludes: new DiscoverySource[] +{ + default +}, templateId: ""); ]]> - + This sample shows how to call ValidateDiscoveryGroup. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); -Response response = client.ValidateDiscoveryGroup(discoveryGroupPayload); +Response response = client.ValidateDiscoveryGroup(); ]]> This sample shows how to call ValidateDiscoveryGroup with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload +Response response = client.ValidateDiscoveryGroup(name: "", description: "", tier: "", frequencyMilliseconds: 1234L, seeds: new DiscoverySource[] { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource + new DiscoverySource { Kind = DiscoverySourceKind.As, Name = "", - }}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", -}; -Response response = client.ValidateDiscoveryGroup(discoveryGroupPayload); + } +}, names: new string[] { "" }, excludes: new DiscoverySource[] +{ + default +}, templateId: ""); ]]> @@ -1069,7 +993,7 @@ Console.WriteLine(result.GetProperty("createdDate").ToString()); Console.WriteLine(result.GetProperty("templateId").ToString()); ]]> - + This sample shows how to call CreateOrReplaceDiscoveryGroupAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); -Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", discoveryGroupPayload); +Response response = await client.CreateOrReplaceDiscoveryGroupAsync(""); ]]> This sample shows how to call CreateOrReplaceDiscoveryGroupAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload +Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", name: "", description: "", tier: "", frequencyMilliseconds: 1234L, seeds: new DiscoverySource[] { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource + new DiscoverySource { Kind = DiscoverySourceKind.As, Name = "", - }}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", -}; -Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", discoveryGroupPayload); + } +}, names: new string[] { "" }, excludes: new DiscoverySource[] +{ + default +}, templateId: ""); ]]> - + This sample shows how to call CreateOrReplaceDiscoveryGroup. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); -Response response = client.CreateOrReplaceDiscoveryGroup("", discoveryGroupPayload); +Response response = client.CreateOrReplaceDiscoveryGroup(""); ]]> This sample shows how to call CreateOrReplaceDiscoveryGroup with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload +Response response = client.CreateOrReplaceDiscoveryGroup("", name: "", description: "", tier: "", frequencyMilliseconds: 1234L, seeds: new DiscoverySource[] { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource + new DiscoverySource { Kind = DiscoverySourceKind.As, Name = "", - }}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", -}; -Response response = client.CreateOrReplaceDiscoveryGroup("", discoveryGroupPayload); + } +}, names: new string[] { "" }, excludes: new DiscoverySource[] +{ + default +}, templateId: ""); ]]> @@ -1533,7 +1445,7 @@ Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBrea Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("count").ToString()); ]]> - + This sample shows how to call GetSnapshotAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(); -Response response = await client.GetSnapshotAsync(reportAssetSnapshotPayload); +Response response = await client.GetSnapshotAsync(); ]]> This sample shows how to call GetSnapshotAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload -{ - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, -}; -Response response = await client.GetSnapshotAsync(reportAssetSnapshotPayload); +Response response = await client.GetSnapshotAsync(metric: "", labelName: "", size: 1234, page: 1234); ]]> - + This sample shows how to call GetSnapshot. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(); -Response response = client.GetSnapshot(reportAssetSnapshotPayload); +Response response = client.GetSnapshot(); ]]> This sample shows how to call GetSnapshot with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload -{ - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, -}; -Response response = client.GetSnapshot(reportAssetSnapshotPayload); +Response response = client.GetSnapshot(metric: "", labelName: "", size: 1234, page: 1234); ]]> @@ -1703,7 +1599,7 @@ Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProper Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("reason").ToString()); ]]> - + This sample shows how to call GetSummaryAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload(); -Response response = await client.GetSummaryAsync(reportAssetSummaryPayload); +Response response = await client.GetSummaryAsync(); ]]> This sample shows how to call GetSummaryAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload -{ - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", -}; -Response response = await client.GetSummaryAsync(reportAssetSummaryPayload); +Response response = await client.GetSummaryAsync(metricCategories: new string[] { "" }, metrics: new string[] { "" }, filters: new string[] { "" }, groupBy: "", segmentBy: "", labelName: ""); ]]> - + This sample shows how to call GetSummary. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload(); -Response response = client.GetSummary(reportAssetSummaryPayload); +Response response = client.GetSummary(); ]]> This sample shows how to call GetSummary with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload -{ - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", -}; -Response response = client.GetSummary(reportAssetSummaryPayload); +Response response = client.GetSummary(metricCategories: new string[] { "" }, metrics: new string[] { "" }, filters: new string[] { "" }, groupBy: "", segmentBy: "", labelName: ""); ]]> @@ -1961,7 +1837,7 @@ Console.WriteLine(result.GetProperty("filter").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); ]]> - + This sample shows how to call CreateOrReplaceSavedFilterAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); -Response response = await client.CreateOrReplaceSavedFilterAsync("", savedFilterPayload); +Response response = await client.CreateOrReplaceSavedFilterAsync("", "", ""); ]]> This sample shows how to call CreateOrReplaceSavedFilterAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); -Response response = await client.CreateOrReplaceSavedFilterAsync("", savedFilterPayload); +Response response = await client.CreateOrReplaceSavedFilterAsync("", "", ""); ]]> - + This sample shows how to call CreateOrReplaceSavedFilter. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); -Response response = client.CreateOrReplaceSavedFilter("", savedFilterPayload); +Response response = client.CreateOrReplaceSavedFilter("", "", ""); ]]> This sample shows how to call CreateOrReplaceSavedFilter with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); -Response response = client.CreateOrReplaceSavedFilter("", savedFilterPayload); +Response response = client.CreateOrReplaceSavedFilter("", "", ""); ]]> diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs index 44df688206fea..f248f6000b68e 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs @@ -6,6 +6,8 @@ #nullable disable using System; +using System.Collections.Generic; +using System.Linq; using System.Threading; using System.Threading.Tasks; using Autorest.CSharp.Core; @@ -63,35 +65,39 @@ public EasmClient(Uri endpoint, TokenCredential credential, EasmClientOptions op /// Update labels on assets matching the provided filter. /// An expression on the resource type that selects the resources to be returned. - /// A request body used to update an asset. + /// The state to update the asset to. + /// A string which can be used to identify the asset in external systems. + /// Any Labels to update the asset with. + /// A list of asset types to cascade the updates to. /// The cancellation token to use. - /// or is null. - /// - public virtual async Task> UpdateAssetsAsync(string filter, AssetUpdatePayload assetUpdatePayload, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual async Task> UpdateAssetsAsync(string filter, AssetUpdateState? state = null, string externalId = null, IDictionary labels = null, AssetUpdateTransfers? transfers = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(filter, nameof(filter)); - Argument.AssertNotNull(assetUpdatePayload, nameof(assetUpdatePayload)); - using RequestContent content = assetUpdatePayload.ToRequestContent(); + AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(state, externalId, labels ?? new ChangeTrackingDictionary(), transfers, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateAssetsAsync(filter, content, context).ConfigureAwait(false); + Response response = await UpdateAssetsAsync(filter, assetUpdatePayload.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(TaskResource.FromResponse(response), response); } /// Update labels on assets matching the provided filter. /// An expression on the resource type that selects the resources to be returned. - /// A request body used to update an asset. + /// The state to update the asset to. + /// A string which can be used to identify the asset in external systems. + /// Any Labels to update the asset with. + /// A list of asset types to cascade the updates to. /// The cancellation token to use. - /// or is null. - /// - public virtual Response UpdateAssets(string filter, AssetUpdatePayload assetUpdatePayload, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual Response UpdateAssets(string filter, AssetUpdateState? state = null, string externalId = null, IDictionary labels = null, AssetUpdateTransfers? transfers = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(filter, nameof(filter)); - Argument.AssertNotNull(assetUpdatePayload, nameof(assetUpdatePayload)); - using RequestContent content = assetUpdatePayload.ToRequestContent(); + AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(state, externalId, labels ?? new ChangeTrackingDictionary(), transfers, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateAssets(filter, content, context); + Response response = UpdateAssets(filter, assetUpdatePayload.ToRequestContent(), context); return Response.FromValue(TaskResource.FromResponse(response), response); } @@ -105,7 +111,7 @@ public virtual Response UpdateAssets(string filter, AssetUpdatePay /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -146,7 +152,7 @@ public virtual async Task UpdateAssetsAsync(string filter, RequestCont /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -288,32 +294,46 @@ public virtual Response GetAssetResource(string assetId, RequestContext context) } /// Validate a data connection with a given dataConnectionName. - /// The to use. + /// Discriminator property for DataConnectionPayload. + /// The name of data connection. + /// The type of data the data connection will transfer. + /// The rate at which the data connection will receive updates. + /// The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). /// The cancellation token to use. - /// is null. - /// - public virtual async Task> ValidateDataConnectionAsync(DataConnectionPayload dataConnectionPayload, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(dataConnectionPayload, nameof(dataConnectionPayload)); - - using RequestContent content = dataConnectionPayload.ToRequestContent(); + /// + public virtual async Task> ValidateDataConnectionAsync(string kind, string name = null, DataConnectionContent? content = null, DataConnectionFrequency? frequency = null, int? frequencyOffset = null, CancellationToken cancellationToken = default) + { + DataConnectionPayload dataConnectionPayload = new Easm.DataConnectionPayload( + kind, + name, + content, + frequency, + frequencyOffset, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await ValidateDataConnectionAsync(content, context).ConfigureAwait(false); + Response response = await ValidateDataConnectionAsync(dataConnectionPayload.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(ValidateResult.FromResponse(response), response); } /// Validate a data connection with a given dataConnectionName. - /// The to use. + /// Discriminator property for DataConnectionPayload. + /// The name of data connection. + /// The type of data the data connection will transfer. + /// The rate at which the data connection will receive updates. + /// The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). /// The cancellation token to use. - /// is null. - /// - public virtual Response ValidateDataConnection(DataConnectionPayload dataConnectionPayload, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(dataConnectionPayload, nameof(dataConnectionPayload)); - - using RequestContent content = dataConnectionPayload.ToRequestContent(); + /// + public virtual Response ValidateDataConnection(string kind, string name = null, DataConnectionContent? content = null, DataConnectionFrequency? frequency = null, int? frequencyOffset = null, CancellationToken cancellationToken = default) + { + DataConnectionPayload dataConnectionPayload = new Easm.DataConnectionPayload( + kind, + name, + content, + frequency, + frequencyOffset, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = ValidateDataConnection(content, context); + Response response = ValidateDataConnection(dataConnectionPayload.ToRequestContent(), context); return Response.FromValue(ValidateResult.FromResponse(response), response); } @@ -327,7 +347,7 @@ public virtual Response ValidateDataConnection(DataConnectionPay /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -366,7 +386,7 @@ public virtual async Task ValidateDataConnectionAsync(RequestContent c /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -507,37 +527,55 @@ public virtual Response GetDataConnection(string dataConnectionName, RequestCont /// Create or replace a data connection with a given dataConnectionName. /// The caller provided unique name for the resource. - /// The to use. + /// Discriminator property for DataConnectionPayload. + /// The name of data connection. + /// The type of data the data connection will transfer. + /// The rate at which the data connection will receive updates. + /// The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). /// The cancellation token to use. - /// or is null. + /// is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> CreateOrReplaceDataConnectionAsync(string dataConnectionName, DataConnectionPayload dataConnectionPayload, CancellationToken cancellationToken = default) + /// + public virtual async Task> CreateOrReplaceDataConnectionAsync(string dataConnectionName, string kind, string name = null, DataConnectionContent? content = null, DataConnectionFrequency? frequency = null, int? frequencyOffset = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - Argument.AssertNotNull(dataConnectionPayload, nameof(dataConnectionPayload)); - using RequestContent content = dataConnectionPayload.ToRequestContent(); + DataConnectionPayload dataConnectionPayload = new Easm.DataConnectionPayload( + kind, + name, + content, + frequency, + frequencyOffset, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateOrReplaceDataConnectionAsync(dataConnectionName, content, context).ConfigureAwait(false); + Response response = await CreateOrReplaceDataConnectionAsync(dataConnectionName, dataConnectionPayload.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(DataConnection.FromResponse(response), response); } /// Create or replace a data connection with a given dataConnectionName. /// The caller provided unique name for the resource. - /// The to use. + /// Discriminator property for DataConnectionPayload. + /// The name of data connection. + /// The type of data the data connection will transfer. + /// The rate at which the data connection will receive updates. + /// The day to update the data connection on. (1-7 for weekly, 1-31 for monthly). /// The cancellation token to use. - /// or is null. + /// is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual Response CreateOrReplaceDataConnection(string dataConnectionName, DataConnectionPayload dataConnectionPayload, CancellationToken cancellationToken = default) + /// + public virtual Response CreateOrReplaceDataConnection(string dataConnectionName, string kind, string name = null, DataConnectionContent? content = null, DataConnectionFrequency? frequency = null, int? frequencyOffset = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - Argument.AssertNotNull(dataConnectionPayload, nameof(dataConnectionPayload)); - using RequestContent content = dataConnectionPayload.ToRequestContent(); + DataConnectionPayload dataConnectionPayload = new Easm.DataConnectionPayload( + kind, + name, + content, + frequency, + frequencyOffset, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateOrReplaceDataConnection(dataConnectionName, content, context); + Response response = CreateOrReplaceDataConnection(dataConnectionName, dataConnectionPayload.ToRequestContent(), context); return Response.FromValue(DataConnection.FromResponse(response), response); } @@ -551,7 +589,7 @@ public virtual Response CreateOrReplaceDataConnection(string dat /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -593,7 +631,7 @@ public virtual async Task CreateOrReplaceDataConnectionAsync(string da /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -698,32 +736,58 @@ public virtual Response DeleteDataConnection(string dataConnectionName, RequestC } /// Validate a discovery group with a given groupName. - /// A request body used to create a discovery group. + /// The name for a disco group. + /// The description for a disco group. + /// The tier for the disco group which will affect the algorithm used for the disco runs in this group. + /// The frequency at which the disco group is supposed to be rerun in milliseconds. + /// The list of seeds used for the disco group runs. + /// The list of names used for the disco group runs. + /// The list of excludes used for the disco group runs, aka assets to exclude from the discovery algorithm. + /// The unique identifier for the disco template used for the disco group creation. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> ValidateDiscoveryGroupAsync(DiscoveryGroupPayload discoveryGroupPayload, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(discoveryGroupPayload, nameof(discoveryGroupPayload)); - - using RequestContent content = discoveryGroupPayload.ToRequestContent(); + /// + public virtual async Task> ValidateDiscoveryGroupAsync(string name = null, string description = null, string tier = null, long? frequencyMilliseconds = null, IEnumerable seeds = null, IEnumerable names = null, IEnumerable excludes = null, string templateId = null, CancellationToken cancellationToken = default) + { + DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload( + name, + description, + tier, + frequencyMilliseconds, + seeds?.ToList() as IList ?? new ChangeTrackingList(), + names?.ToList() as IList ?? new ChangeTrackingList(), + excludes?.ToList() as IList ?? new ChangeTrackingList(), + templateId, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await ValidateDiscoveryGroupAsync(content, context).ConfigureAwait(false); + Response response = await ValidateDiscoveryGroupAsync(discoveryGroupPayload.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(ValidateResult.FromResponse(response), response); } /// Validate a discovery group with a given groupName. - /// A request body used to create a discovery group. + /// The name for a disco group. + /// The description for a disco group. + /// The tier for the disco group which will affect the algorithm used for the disco runs in this group. + /// The frequency at which the disco group is supposed to be rerun in milliseconds. + /// The list of seeds used for the disco group runs. + /// The list of names used for the disco group runs. + /// The list of excludes used for the disco group runs, aka assets to exclude from the discovery algorithm. + /// The unique identifier for the disco template used for the disco group creation. /// The cancellation token to use. - /// is null. - /// - public virtual Response ValidateDiscoveryGroup(DiscoveryGroupPayload discoveryGroupPayload, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(discoveryGroupPayload, nameof(discoveryGroupPayload)); - - using RequestContent content = discoveryGroupPayload.ToRequestContent(); + /// + public virtual Response ValidateDiscoveryGroup(string name = null, string description = null, string tier = null, long? frequencyMilliseconds = null, IEnumerable seeds = null, IEnumerable names = null, IEnumerable excludes = null, string templateId = null, CancellationToken cancellationToken = default) + { + DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload( + name, + description, + tier, + frequencyMilliseconds, + seeds?.ToList() as IList ?? new ChangeTrackingList(), + names?.ToList() as IList ?? new ChangeTrackingList(), + excludes?.ToList() as IList ?? new ChangeTrackingList(), + templateId, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = ValidateDiscoveryGroup(content, context); + Response response = ValidateDiscoveryGroup(discoveryGroupPayload.ToRequestContent(), context); return Response.FromValue(ValidateResult.FromResponse(response), response); } @@ -737,7 +801,7 @@ public virtual Response ValidateDiscoveryGroup(DiscoveryGroupPay /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -776,7 +840,7 @@ public virtual async Task ValidateDiscoveryGroupAsync(RequestContent c /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -917,37 +981,67 @@ public virtual Response GetDiscoveryGroup(string groupName, RequestContext conte /// Create a discovery group with a given groupName. /// The caller provided unique name for the resource. - /// A request body used to create a discovery group. + /// The name for a disco group. + /// The description for a disco group. + /// The tier for the disco group which will affect the algorithm used for the disco runs in this group. + /// The frequency at which the disco group is supposed to be rerun in milliseconds. + /// The list of seeds used for the disco group runs. + /// The list of names used for the disco group runs. + /// The list of excludes used for the disco group runs, aka assets to exclude from the discovery algorithm. + /// The unique identifier for the disco template used for the disco group creation. /// The cancellation token to use. - /// or is null. + /// is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> CreateOrReplaceDiscoveryGroupAsync(string groupName, DiscoveryGroupPayload discoveryGroupPayload, CancellationToken cancellationToken = default) + /// + public virtual async Task> CreateOrReplaceDiscoveryGroupAsync(string groupName, string name = null, string description = null, string tier = null, long? frequencyMilliseconds = null, IEnumerable seeds = null, IEnumerable names = null, IEnumerable excludes = null, string templateId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - Argument.AssertNotNull(discoveryGroupPayload, nameof(discoveryGroupPayload)); - using RequestContent content = discoveryGroupPayload.ToRequestContent(); + DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload( + name, + description, + tier, + frequencyMilliseconds, + seeds?.ToList() as IList ?? new ChangeTrackingList(), + names?.ToList() as IList ?? new ChangeTrackingList(), + excludes?.ToList() as IList ?? new ChangeTrackingList(), + templateId, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateOrReplaceDiscoveryGroupAsync(groupName, content, context).ConfigureAwait(false); + Response response = await CreateOrReplaceDiscoveryGroupAsync(groupName, discoveryGroupPayload.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(DiscoveryGroup.FromResponse(response), response); } /// Create a discovery group with a given groupName. /// The caller provided unique name for the resource. - /// A request body used to create a discovery group. + /// The name for a disco group. + /// The description for a disco group. + /// The tier for the disco group which will affect the algorithm used for the disco runs in this group. + /// The frequency at which the disco group is supposed to be rerun in milliseconds. + /// The list of seeds used for the disco group runs. + /// The list of names used for the disco group runs. + /// The list of excludes used for the disco group runs, aka assets to exclude from the discovery algorithm. + /// The unique identifier for the disco template used for the disco group creation. /// The cancellation token to use. - /// or is null. + /// is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual Response CreateOrReplaceDiscoveryGroup(string groupName, DiscoveryGroupPayload discoveryGroupPayload, CancellationToken cancellationToken = default) + /// + public virtual Response CreateOrReplaceDiscoveryGroup(string groupName, string name = null, string description = null, string tier = null, long? frequencyMilliseconds = null, IEnumerable seeds = null, IEnumerable names = null, IEnumerable excludes = null, string templateId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - Argument.AssertNotNull(discoveryGroupPayload, nameof(discoveryGroupPayload)); - using RequestContent content = discoveryGroupPayload.ToRequestContent(); + DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload( + name, + description, + tier, + frequencyMilliseconds, + seeds?.ToList() as IList ?? new ChangeTrackingList(), + names?.ToList() as IList ?? new ChangeTrackingList(), + excludes?.ToList() as IList ?? new ChangeTrackingList(), + templateId, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateOrReplaceDiscoveryGroup(groupName, content, context); + Response response = CreateOrReplaceDiscoveryGroup(groupName, discoveryGroupPayload.ToRequestContent(), context); return Response.FromValue(DiscoveryGroup.FromResponse(response), response); } @@ -961,7 +1055,7 @@ public virtual Response CreateOrReplaceDiscoveryGroup(string gro /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1003,7 +1097,7 @@ public virtual async Task CreateOrReplaceDiscoveryGroupAsync(string gr /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1308,32 +1402,32 @@ public virtual Response GetBillable(RequestContext context) } /// Get the most recent snapshot of asset summary values for the snapshot request. - /// A request body used to retrieve an asset report snapshot. + /// The metric to retrieve a snapshot for. + /// The name of the label to retrieve a snapshot for. + /// The number of assets per page. + /// The page to retrieve. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> GetSnapshotAsync(ReportAssetSnapshotPayload reportAssetSnapshotPayload, CancellationToken cancellationToken = default) + /// + public virtual async Task> GetSnapshotAsync(string metric = null, string labelName = null, int? size = null, int? page = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(reportAssetSnapshotPayload, nameof(reportAssetSnapshotPayload)); - - using RequestContent content = reportAssetSnapshotPayload.ToRequestContent(); + ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(metric, labelName, size, page, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetSnapshotAsync(content, context).ConfigureAwait(false); + Response response = await GetSnapshotAsync(reportAssetSnapshotPayload.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(ReportAssetSnapshotResult.FromResponse(response), response); } /// Get the most recent snapshot of asset summary values for the snapshot request. - /// A request body used to retrieve an asset report snapshot. + /// The metric to retrieve a snapshot for. + /// The name of the label to retrieve a snapshot for. + /// The number of assets per page. + /// The page to retrieve. /// The cancellation token to use. - /// is null. - /// - public virtual Response GetSnapshot(ReportAssetSnapshotPayload reportAssetSnapshotPayload, CancellationToken cancellationToken = default) + /// + public virtual Response GetSnapshot(string metric = null, string labelName = null, int? size = null, int? page = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(reportAssetSnapshotPayload, nameof(reportAssetSnapshotPayload)); - - using RequestContent content = reportAssetSnapshotPayload.ToRequestContent(); + ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(metric, labelName, size, page, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetSnapshot(content, context); + Response response = GetSnapshot(reportAssetSnapshotPayload.ToRequestContent(), context); return Response.FromValue(ReportAssetSnapshotResult.FromResponse(response), response); } @@ -1347,7 +1441,7 @@ public virtual Response GetSnapshot(ReportAssetSnapsh /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1386,7 +1480,7 @@ public virtual async Task GetSnapshotAsync(RequestContent content, Req /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1416,32 +1510,50 @@ public virtual Response GetSnapshot(RequestContent content, RequestContext conte } /// Get asset summary details for the summary request. - /// A request body used to retrieve summary asset information. One and only one collection of summary identifiers must be provided: filters, metrics, or metricCategories. + /// Categories to retrieve risk reporting data for. + /// Metrics to retrieve risk reporting data for. + /// Query filters to apply to the asset summary. + /// A parameter to group the assets by (first level facet field), only used when the chosen summary identifier is filters. + /// A parameter to segment the assets by (second level facet field), only used when the chosen summary identifier is filters. + /// Currently unused. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> GetSummaryAsync(ReportAssetSummaryPayload reportAssetSummaryPayload, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(reportAssetSummaryPayload, nameof(reportAssetSummaryPayload)); - - using RequestContent content = reportAssetSummaryPayload.ToRequestContent(); + /// + public virtual async Task> GetSummaryAsync(IEnumerable metricCategories = null, IEnumerable metrics = null, IEnumerable filters = null, string groupBy = null, string segmentBy = null, string labelName = null, CancellationToken cancellationToken = default) + { + ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload( + metricCategories?.ToList() as IList ?? new ChangeTrackingList(), + metrics?.ToList() as IList ?? new ChangeTrackingList(), + filters?.ToList() as IList ?? new ChangeTrackingList(), + groupBy, + segmentBy, + labelName, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetSummaryAsync(content, context).ConfigureAwait(false); + Response response = await GetSummaryAsync(reportAssetSummaryPayload.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(ReportAssetSummaryResult.FromResponse(response), response); } /// Get asset summary details for the summary request. - /// A request body used to retrieve summary asset information. One and only one collection of summary identifiers must be provided: filters, metrics, or metricCategories. + /// Categories to retrieve risk reporting data for. + /// Metrics to retrieve risk reporting data for. + /// Query filters to apply to the asset summary. + /// A parameter to group the assets by (first level facet field), only used when the chosen summary identifier is filters. + /// A parameter to segment the assets by (second level facet field), only used when the chosen summary identifier is filters. + /// Currently unused. /// The cancellation token to use. - /// is null. - /// - public virtual Response GetSummary(ReportAssetSummaryPayload reportAssetSummaryPayload, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(reportAssetSummaryPayload, nameof(reportAssetSummaryPayload)); - - using RequestContent content = reportAssetSummaryPayload.ToRequestContent(); + /// + public virtual Response GetSummary(IEnumerable metricCategories = null, IEnumerable metrics = null, IEnumerable filters = null, string groupBy = null, string segmentBy = null, string labelName = null, CancellationToken cancellationToken = default) + { + ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload( + metricCategories?.ToList() as IList ?? new ChangeTrackingList(), + metrics?.ToList() as IList ?? new ChangeTrackingList(), + filters?.ToList() as IList ?? new ChangeTrackingList(), + groupBy, + segmentBy, + labelName, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetSummary(content, context); + Response response = GetSummary(reportAssetSummaryPayload.ToRequestContent(), context); return Response.FromValue(ReportAssetSummaryResult.FromResponse(response), response); } @@ -1455,7 +1567,7 @@ public virtual Response GetSummary(ReportAssetSummaryP /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1494,7 +1606,7 @@ public virtual async Task GetSummaryAsync(RequestContent content, Requ /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1635,37 +1747,41 @@ public virtual Response GetSavedFilter(string filterName, RequestContext context /// Create or replace a saved filter with a given filterName. /// The caller provided unique name for the resource. - /// A request body used to create a saved filter. + /// An expression on the resource type that selects the resources to be returned. + /// A human readable description of the saved filter. /// The cancellation token to use. - /// or is null. + /// , or is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> CreateOrReplaceSavedFilterAsync(string filterName, SavedFilterPayload savedFilterPayload, CancellationToken cancellationToken = default) + /// + public virtual async Task> CreateOrReplaceSavedFilterAsync(string filterName, string filter, string description, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); - Argument.AssertNotNull(savedFilterPayload, nameof(savedFilterPayload)); + Argument.AssertNotNull(filter, nameof(filter)); + Argument.AssertNotNull(description, nameof(description)); - using RequestContent content = savedFilterPayload.ToRequestContent(); + SavedFilterPayload savedFilterPayload = new SavedFilterPayload(filter, description, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateOrReplaceSavedFilterAsync(filterName, content, context).ConfigureAwait(false); + Response response = await CreateOrReplaceSavedFilterAsync(filterName, savedFilterPayload.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(SavedFilter.FromResponse(response), response); } /// Create or replace a saved filter with a given filterName. /// The caller provided unique name for the resource. - /// A request body used to create a saved filter. + /// An expression on the resource type that selects the resources to be returned. + /// A human readable description of the saved filter. /// The cancellation token to use. - /// or is null. + /// , or is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual Response CreateOrReplaceSavedFilter(string filterName, SavedFilterPayload savedFilterPayload, CancellationToken cancellationToken = default) + /// + public virtual Response CreateOrReplaceSavedFilter(string filterName, string filter, string description, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); - Argument.AssertNotNull(savedFilterPayload, nameof(savedFilterPayload)); + Argument.AssertNotNull(filter, nameof(filter)); + Argument.AssertNotNull(description, nameof(description)); - using RequestContent content = savedFilterPayload.ToRequestContent(); + SavedFilterPayload savedFilterPayload = new SavedFilterPayload(filter, description, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateOrReplaceSavedFilter(filterName, content, context); + Response response = CreateOrReplaceSavedFilter(filterName, savedFilterPayload.ToRequestContent(), context); return Response.FromValue(SavedFilter.FromResponse(response), response); } @@ -1679,7 +1795,7 @@ public virtual Response CreateOrReplaceSavedFilter(string filterNam /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1721,7 +1837,7 @@ public virtual async Task CreateOrReplaceSavedFilterAsync(string filte /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.Serialization.cs index 05af097727e82..fc9be9a1941dc 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.Serialization.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Defender.Easm { - public partial class LogAnalyticsDataConnectionPayload : IUtf8JsonSerializable, IJsonModel + internal partial class LogAnalyticsDataConnectionPayload : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.cs index 8548b2b8e98f3..1565ae054ecb3 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Defender.Easm { /// The LogAnalyticsDataConnectionPayload. - public partial class LogAnalyticsDataConnectionPayload : DataConnectionPayload + internal partial class LogAnalyticsDataConnectionPayload : DataConnectionPayload { /// Initializes a new instance of . /// properties. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionProperties.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionProperties.cs index 0138b4633b8a9..16caf36760df0 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionProperties.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionProperties.cs @@ -14,7 +14,7 @@ namespace Azure.Analytics.Defender.Easm public partial class LogAnalyticsDataConnectionProperties : DataConnectionProperties { /// Initializes a new instance of . - public LogAnalyticsDataConnectionProperties() + internal LogAnalyticsDataConnectionProperties() { } @@ -29,8 +29,8 @@ internal LogAnalyticsDataConnectionProperties(IDictionary se } /// log analytics api key. - public string ApiKey { get; set; } + public string ApiKey { get; } /// log analytics workspace id. - public string WorkspaceId { get; set; } + public string WorkspaceId { get; } } } diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotPayload.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotPayload.Serialization.cs index e81dc24de24ba..79eebef37a3cd 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotPayload.Serialization.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotPayload.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Defender.Easm { - public partial class ReportAssetSnapshotPayload : IUtf8JsonSerializable, IJsonModel + internal partial class ReportAssetSnapshotPayload : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotPayload.cs index 74ce8c27f6da5..b0420427a7c27 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotPayload.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Defender.Easm { /// A request body used to retrieve an asset report snapshot. - public partial class ReportAssetSnapshotPayload + internal partial class ReportAssetSnapshotPayload { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSummaryPayload.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSummaryPayload.Serialization.cs index c0a1676cf4ab4..b3b0b2d36faf3 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSummaryPayload.Serialization.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSummaryPayload.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Defender.Easm { - public partial class ReportAssetSummaryPayload : IUtf8JsonSerializable, IJsonModel + internal partial class ReportAssetSummaryPayload : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSummaryPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSummaryPayload.cs index 2b2370ae9c976..654ac99d213cd 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSummaryPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSummaryPayload.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Defender.Easm { /// A request body used to retrieve summary asset information. One and only one collection of summary identifiers must be provided: filters, metrics, or metricCategories. - public partial class ReportAssetSummaryPayload + internal partial class ReportAssetSummaryPayload { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/SavedFilterPayload.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/SavedFilterPayload.Serialization.cs index 6708042413711..00454a959dc25 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/SavedFilterPayload.Serialization.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/SavedFilterPayload.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Defender.Easm { - public partial class SavedFilterPayload : IUtf8JsonSerializable, IJsonModel + internal partial class SavedFilterPayload : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/SavedFilterPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/SavedFilterPayload.cs index 89e4313caa019..1fce36d68d9ae 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/SavedFilterPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/SavedFilterPayload.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Defender.Easm { /// A request body used to create a saved filter. - public partial class SavedFilterPayload + internal partial class SavedFilterPayload { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs index 2bac73e1e7030..6050b297f149b 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure.Core; @@ -54,8 +55,7 @@ public void Example_AssetResource_UpdateAssets_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(); - Response response = client.UpdateAssets("", assetUpdatePayload); + Response response = client.UpdateAssets(""); } [Test] @@ -66,8 +66,7 @@ public async Task Example_AssetResource_UpdateAssets_ShortVersion_Convenience_As TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(); - Response response = await client.UpdateAssetsAsync("", assetUpdatePayload); + Response response = await client.UpdateAssetsAsync(""); } [Test] @@ -140,17 +139,10 @@ public void Example_AssetResource_UpdateAssets_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload + Response response = client.UpdateAssets("", state: AssetUpdateState.Candidate, externalId: "", labels: new Dictionary { - State = AssetUpdateState.Candidate, - ExternalId = "", - Labels = -{ -["key"] = true -}, - Transfers = AssetUpdateTransfers.As, - }; - Response response = client.UpdateAssets("", assetUpdatePayload); + ["key"] = true + }, transfers: AssetUpdateTransfers.As); } [Test] @@ -161,17 +153,10 @@ public async Task Example_AssetResource_UpdateAssets_AllParameters_Convenience_A TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload + Response response = await client.UpdateAssetsAsync("", state: AssetUpdateState.Candidate, externalId: "", labels: new Dictionary { - State = AssetUpdateState.Candidate, - ExternalId = "", - Labels = -{ -["key"] = true -}, - Transfers = AssetUpdateTransfers.As, - }; - Response response = await client.UpdateAssetsAsync("", assetUpdatePayload); + ["key"] = true + }, transfers: AssetUpdateTransfers.As); } [Test] @@ -356,8 +341,7 @@ public void Example_EasmClient_ValidateDataConnection_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = client.ValidateDataConnection(dataConnectionPayload); + Response response = client.ValidateDataConnection("logAnalytics"); } [Test] @@ -368,8 +352,7 @@ public async Task Example_EasmClient_ValidateDataConnection_ShortVersion_Conveni TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = await client.ValidateDataConnectionAsync(dataConnectionPayload); + Response response = await client.ValidateDataConnectionAsync("logAnalytics"); } [Test] @@ -442,18 +425,7 @@ public void Example_EasmClient_ValidateDataConnection_AllParameters_Convenience( TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) - { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, - }; - Response response = client.ValidateDataConnection(dataConnectionPayload); + Response response = client.ValidateDataConnection("logAnalytics", name: "", content: DataConnectionContent.Assets, frequency: DataConnectionFrequency.Daily, frequencyOffset: 1234); } [Test] @@ -464,18 +436,7 @@ public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Conven TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) - { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, - }; - Response response = await client.ValidateDataConnectionAsync(dataConnectionPayload); + Response response = await client.ValidateDataConnectionAsync("logAnalytics", name: "", content: DataConnectionContent.Assets, frequency: DataConnectionFrequency.Daily, frequencyOffset: 1234); } [Test] @@ -650,8 +611,7 @@ public void Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Co TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = client.CreateOrReplaceDataConnection("", dataConnectionPayload); + Response response = client.CreateOrReplaceDataConnection("", "logAnalytics"); } [Test] @@ -662,8 +622,7 @@ public async Task Example_DataConnection_CreateOrReplaceDataConnection_ShortVers TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = await client.CreateOrReplaceDataConnectionAsync("", dataConnectionPayload); + Response response = await client.CreateOrReplaceDataConnectionAsync("", "logAnalytics"); } [Test] @@ -750,18 +709,7 @@ public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_C TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) - { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, - }; - Response response = client.CreateOrReplaceDataConnection("", dataConnectionPayload); + Response response = client.CreateOrReplaceDataConnection("", "logAnalytics", name: "", content: DataConnectionContent.Assets, frequency: DataConnectionFrequency.Daily, frequencyOffset: 1234); } [Test] @@ -772,18 +720,7 @@ public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParame TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) - { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, - }; - Response response = await client.CreateOrReplaceDataConnectionAsync("", dataConnectionPayload); + Response response = await client.CreateOrReplaceDataConnectionAsync("", "logAnalytics", name: "", content: DataConnectionContent.Assets, frequency: DataConnectionFrequency.Daily, frequencyOffset: 1234); } [Test] @@ -876,8 +813,7 @@ public void Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); - Response response = client.ValidateDiscoveryGroup(discoveryGroupPayload); + Response response = client.ValidateDiscoveryGroup(); } [Test] @@ -888,8 +824,7 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Conveni TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); - Response response = await client.ValidateDiscoveryGroupAsync(discoveryGroupPayload); + Response response = await client.ValidateDiscoveryGroupAsync(); } [Test] @@ -984,22 +919,17 @@ public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience( TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload + Response response = client.ValidateDiscoveryGroup(name: "", description: "", tier: "", frequencyMilliseconds: 1234L, seeds: new DiscoverySource[] { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource +new DiscoverySource { Kind = DiscoverySourceKind.As, Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", - }; - Response response = client.ValidateDiscoveryGroup(discoveryGroupPayload); +} + }, names: new string[] { "" }, excludes: new DiscoverySource[] + { +default + }, templateId: ""); } [Test] @@ -1010,22 +940,17 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Conven TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload + Response response = await client.ValidateDiscoveryGroupAsync(name: "", description: "", tier: "", frequencyMilliseconds: 1234L, seeds: new DiscoverySource[] { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource +new DiscoverySource { Kind = DiscoverySourceKind.As, Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", - }; - Response response = await client.ValidateDiscoveryGroupAsync(discoveryGroupPayload); +} + }, names: new string[] { "" }, excludes: new DiscoverySource[] + { +default + }, templateId: ""); } [Test] @@ -1212,8 +1137,7 @@ public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Conven TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); - Response response = client.CreateOrReplaceDiscoveryGroup("", discoveryGroupPayload); + Response response = client.CreateOrReplaceDiscoveryGroup(""); } [Test] @@ -1224,8 +1148,7 @@ public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_ TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", discoveryGroupPayload); + Response response = await client.CreateOrReplaceDiscoveryGroupAsync(""); } [Test] @@ -1358,22 +1281,17 @@ public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Conve TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload + Response response = client.CreateOrReplaceDiscoveryGroup("", name: "", description: "", tier: "", frequencyMilliseconds: 1234L, seeds: new DiscoverySource[] { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource +new DiscoverySource { Kind = DiscoverySourceKind.As, Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", - }; - Response response = client.CreateOrReplaceDiscoveryGroup("", discoveryGroupPayload); +} + }, names: new string[] { "" }, excludes: new DiscoverySource[] + { +default + }, templateId: ""); } [Test] @@ -1384,22 +1302,17 @@ public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload + Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", name: "", description: "", tier: "", frequencyMilliseconds: 1234L, seeds: new DiscoverySource[] { - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource +new DiscoverySource { Kind = DiscoverySourceKind.As, Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", - }; - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", discoveryGroupPayload); +} + }, names: new string[] { "" }, excludes: new DiscoverySource[] + { +default + }, templateId: ""); } [Test] @@ -1718,8 +1631,7 @@ public void Example_EasmClient_GetSnapshot_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(); - Response response = client.GetSnapshot(reportAssetSnapshotPayload); + Response response = client.GetSnapshot(); } [Test] @@ -1730,8 +1642,7 @@ public async Task Example_EasmClient_GetSnapshot_ShortVersion_Convenience_Async( TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(); - Response response = await client.GetSnapshotAsync(reportAssetSnapshotPayload); + Response response = await client.GetSnapshotAsync(); } [Test] @@ -1834,14 +1745,7 @@ public void Example_EasmClient_GetSnapshot_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload - { - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, - }; - Response response = client.GetSnapshot(reportAssetSnapshotPayload); + Response response = client.GetSnapshot(metric: "", labelName: "", size: 1234, page: 1234); } [Test] @@ -1852,14 +1756,7 @@ public async Task Example_EasmClient_GetSnapshot_AllParameters_Convenience_Async TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload - { - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, - }; - Response response = await client.GetSnapshotAsync(reportAssetSnapshotPayload); + Response response = await client.GetSnapshotAsync(metric: "", labelName: "", size: 1234, page: 1234); } [Test] @@ -1900,8 +1797,7 @@ public void Example_EasmClient_GetSummary_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload(); - Response response = client.GetSummary(reportAssetSummaryPayload); + Response response = client.GetSummary(); } [Test] @@ -1912,8 +1808,7 @@ public async Task Example_EasmClient_GetSummary_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload(); - Response response = await client.GetSummaryAsync(reportAssetSummaryPayload); + Response response = await client.GetSummaryAsync(); } [Test] @@ -2004,16 +1899,7 @@ public void Example_EasmClient_GetSummary_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload - { - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", - }; - Response response = client.GetSummary(reportAssetSummaryPayload); + Response response = client.GetSummary(metricCategories: new string[] { "" }, metrics: new string[] { "" }, filters: new string[] { "" }, groupBy: "", segmentBy: "", labelName: ""); } [Test] @@ -2024,16 +1910,7 @@ public async Task Example_EasmClient_GetSummary_AllParameters_Convenience_Async( TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload - { - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", - }; - Response response = await client.GetSummaryAsync(reportAssetSummaryPayload); + Response response = await client.GetSummaryAsync(metricCategories: new string[] { "" }, metrics: new string[] { "" }, filters: new string[] { "" }, groupBy: "", segmentBy: "", labelName: ""); } [Test] @@ -2190,8 +2067,7 @@ public void Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Convenie TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); - Response response = client.CreateOrReplaceSavedFilter("", savedFilterPayload); + Response response = client.CreateOrReplaceSavedFilter("", "", ""); } [Test] @@ -2202,8 +2078,7 @@ public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Co TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); - Response response = await client.CreateOrReplaceSavedFilterAsync("", savedFilterPayload); + Response response = await client.CreateOrReplaceSavedFilterAsync("", "", ""); } [Test] @@ -2260,8 +2135,7 @@ public void Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Conveni TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); - Response response = client.CreateOrReplaceSavedFilter("", savedFilterPayload); + Response response = client.CreateOrReplaceSavedFilter("", "", ""); } [Test] @@ -2272,8 +2146,7 @@ public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_C TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); - Response response = await client.CreateOrReplaceSavedFilterAsync("", savedFilterPayload); + Response response = await client.CreateOrReplaceSavedFilterAsync("", "", ""); } [Test] diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml index caebbcff8c2ff..01d052fff1839 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml @@ -1,7 +1,7 @@ - + This sample shows how to call CreateLivenessSessionAsync. "); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive); -Response response = await client.CreateLivenessSessionAsync(createLivenessSessionContent); +Response response = await client.CreateLivenessSessionAsync(LivenessOperationMode.Passive); ]]> This sample shows how to call CreateLivenessSessionAsync with all parameters. "); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive) -{ - SendResultsToClient = true, - DeviceCorrelationIdSetInClient = true, - DeviceCorrelationId = "", - AuthTokenTimeToLiveInSeconds = 1234, -}; -Response response = await client.CreateLivenessSessionAsync(createLivenessSessionContent); +Response response = await client.CreateLivenessSessionAsync(LivenessOperationMode.Passive, sendResultsToClient: true, deviceCorrelationIdSetInClient: true, deviceCorrelationId: "", authTokenTimeToLiveInSeconds: 1234); ]]> - + This sample shows how to call CreateLivenessSession. "); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive); -Response response = client.CreateLivenessSession(createLivenessSessionContent); +Response response = client.CreateLivenessSession(LivenessOperationMode.Passive); ]]> This sample shows how to call CreateLivenessSession with all parameters. "); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive) -{ - SendResultsToClient = true, - DeviceCorrelationIdSetInClient = true, - DeviceCorrelationId = "", - AuthTokenTimeToLiveInSeconds = 1234, -}; -Response response = client.CreateLivenessSession(createLivenessSessionContent); +Response response = client.CreateLivenessSession(LivenessOperationMode.Passive, sendResultsToClient: true, deviceCorrelationIdSetInClient: true, deviceCorrelationId: "", authTokenTimeToLiveInSeconds: 1234); ]]> diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs index f86f2c12ada35..ba993627aeb2c 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -103,9 +104,12 @@ public FaceSessionClient(Uri endpoint, TokenCredential credential, AzureAIVision } /// Create a new detect liveness session. - /// Request for creating liveness session. + /// Type of liveness mode the client should follow. + /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. + /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. + /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. /// The cancellation token to use. - /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -118,21 +122,28 @@ public FaceSessionClient(Uri endpoint, TokenCredential credential, AzureAIVision /// > [!NOTE] /// > Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries. /// - /// - public virtual async Task> CreateLivenessSessionAsync(CreateLivenessSessionContent createLivenessSessionContent, CancellationToken cancellationToken = default) + /// + public virtual async Task> CreateLivenessSessionAsync(LivenessOperationMode livenessOperationMode, bool? sendResultsToClient = null, bool? deviceCorrelationIdSetInClient = null, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); - - using RequestContent content = createLivenessSessionContent.ToRequestContent(); + CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent( + livenessOperationMode, + sendResultsToClient, + deviceCorrelationIdSetInClient, + deviceCorrelationId, + authTokenTimeToLiveInSeconds, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateLivenessSessionAsync(content, context).ConfigureAwait(false); + Response response = await CreateLivenessSessionAsync(createLivenessSessionContent.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(CreateLivenessSessionResult.FromResponse(response), response); } /// Create a new detect liveness session. - /// Request for creating liveness session. + /// Type of liveness mode the client should follow. + /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. + /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. + /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. /// The cancellation token to use. - /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -145,14 +156,18 @@ public virtual async Task> CreateLivenessS /// > [!NOTE] /// > Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries. /// - /// - public virtual Response CreateLivenessSession(CreateLivenessSessionContent createLivenessSessionContent, CancellationToken cancellationToken = default) + /// + public virtual Response CreateLivenessSession(LivenessOperationMode livenessOperationMode, bool? sendResultsToClient = null, bool? deviceCorrelationIdSetInClient = null, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); - - using RequestContent content = createLivenessSessionContent.ToRequestContent(); + CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent( + livenessOperationMode, + sendResultsToClient, + deviceCorrelationIdSetInClient, + deviceCorrelationId, + authTokenTimeToLiveInSeconds, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateLivenessSession(content, context); + Response response = CreateLivenessSession(createLivenessSessionContent.ToRequestContent(), context); return Response.FromValue(CreateLivenessSessionResult.FromResponse(response), response); } @@ -166,7 +181,7 @@ public virtual Response CreateLivenessSession(Creat /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -205,7 +220,7 @@ public virtual async Task CreateLivenessSessionAsync(RequestContent co /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -675,9 +690,12 @@ public virtual Response GetLivenessSessionAuditEntries(string sessionId, string } /// Create a new liveness session with verify. Client device submits VerifyImage during the /detectLivenessWithVerify/singleModal call. - /// Request for creating liveness session. + /// Type of liveness mode the client should follow. + /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. + /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. + /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. /// The cancellation token to use. - /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -698,20 +716,27 @@ public virtual Response GetLivenessSessionAuditEntries(string sessionId, string /// > [!NOTE] /// > Extra measures should be taken to validate that the client is sending the expected VerifyImage. /// - internal virtual async Task> CreateLivenessWithVerifySessionAsync(CreateLivenessSessionContent createLivenessSessionContent, CancellationToken cancellationToken = default) + internal virtual async Task> CreateLivenessWithVerifySessionAsync(LivenessOperationMode livenessOperationMode, bool? sendResultsToClient = null, bool? deviceCorrelationIdSetInClient = null, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); - - using RequestContent content = createLivenessSessionContent.ToRequestContent(); + CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent( + livenessOperationMode, + sendResultsToClient, + deviceCorrelationIdSetInClient, + deviceCorrelationId, + authTokenTimeToLiveInSeconds, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateLivenessWithVerifySessionAsync(content, context).ConfigureAwait(false); + Response response = await CreateLivenessWithVerifySessionAsync(createLivenessSessionContent.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(CreateLivenessWithVerifySessionResult.FromResponse(response), response); } /// Create a new liveness session with verify. Client device submits VerifyImage during the /detectLivenessWithVerify/singleModal call. - /// Request for creating liveness session. + /// Type of liveness mode the client should follow. + /// Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented. + /// Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body. + /// Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null. + /// Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. /// The cancellation token to use. - /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -732,13 +757,17 @@ internal virtual async Task> Cre /// > [!NOTE] /// > Extra measures should be taken to validate that the client is sending the expected VerifyImage. /// - internal virtual Response CreateLivenessWithVerifySession(CreateLivenessSessionContent createLivenessSessionContent, CancellationToken cancellationToken = default) + internal virtual Response CreateLivenessWithVerifySession(LivenessOperationMode livenessOperationMode, bool? sendResultsToClient = null, bool? deviceCorrelationIdSetInClient = null, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); - - using RequestContent content = createLivenessSessionContent.ToRequestContent(); + CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent( + livenessOperationMode, + sendResultsToClient, + deviceCorrelationIdSetInClient, + deviceCorrelationId, + authTokenTimeToLiveInSeconds, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateLivenessWithVerifySession(content, context); + Response response = CreateLivenessWithVerifySession(createLivenessSessionContent.ToRequestContent(), context); return Response.FromValue(CreateLivenessWithVerifySessionResult.FromResponse(response), response); } @@ -752,7 +781,7 @@ internal virtual Response CreateLivenessW /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -790,7 +819,7 @@ internal virtual async Task CreateLivenessWithVerifySessionAsync(Reque /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -819,9 +848,10 @@ internal virtual Response CreateLivenessWithVerifySession(RequestContent content } /// Create a new liveness session with verify. Provide the verify image during session creation. - /// Request of liveness with verify session creation. + /// The parameters for creating session. + /// The image stream for verify. Content-Disposition header field for this part must have filename. /// The cancellation token to use. - /// is null. + /// or is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -840,10 +870,12 @@ internal virtual Response CreateLivenessWithVerifySession(RequestContent content /// /// Recommended Option: VerifyImage is provided during session creation. /// - internal virtual async Task> CreateLivenessWithVerifySessionWithVerifyImageAsync(CreateLivenessWithVerifySessionContent createLivenessWithVerifySessionContent, CancellationToken cancellationToken = default) + internal virtual async Task> CreateLivenessWithVerifySessionWithVerifyImageAsync(CreateLivenessSessionContent parameters, Stream verifyImage, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessWithVerifySessionContent, nameof(createLivenessWithVerifySessionContent)); + Argument.AssertNotNull(parameters, nameof(parameters)); + Argument.AssertNotNull(verifyImage, nameof(verifyImage)); + CreateLivenessWithVerifySessionContent createLivenessWithVerifySessionContent = new CreateLivenessWithVerifySessionContent(parameters, verifyImage, null); using MultipartFormDataRequestContent content = createLivenessWithVerifySessionContent.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateLivenessWithVerifySessionWithVerifyImageAsync(content, content.ContentType, context).ConfigureAwait(false); @@ -851,9 +883,10 @@ internal virtual async Task> Cre } /// Create a new liveness session with verify. Provide the verify image during session creation. - /// Request of liveness with verify session creation. + /// The parameters for creating session. + /// The image stream for verify. Content-Disposition header field for this part must have filename. /// The cancellation token to use. - /// is null. + /// or is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -872,10 +905,12 @@ internal virtual async Task> Cre /// /// Recommended Option: VerifyImage is provided during session creation. /// - internal virtual Response CreateLivenessWithVerifySessionWithVerifyImage(CreateLivenessWithVerifySessionContent createLivenessWithVerifySessionContent, CancellationToken cancellationToken = default) + internal virtual Response CreateLivenessWithVerifySessionWithVerifyImage(CreateLivenessSessionContent parameters, Stream verifyImage, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessWithVerifySessionContent, nameof(createLivenessWithVerifySessionContent)); + Argument.AssertNotNull(parameters, nameof(parameters)); + Argument.AssertNotNull(verifyImage, nameof(verifyImage)); + CreateLivenessWithVerifySessionContent createLivenessWithVerifySessionContent = new CreateLivenessWithVerifySessionContent(parameters, verifyImage, null); using MultipartFormDataRequestContent content = createLivenessWithVerifySessionContent.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateLivenessWithVerifySessionWithVerifyImage(content, content.ContentType, context); @@ -892,7 +927,7 @@ internal virtual Response CreateLivenessW /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -931,7 +966,7 @@ internal virtual async Task CreateLivenessWithVerifySessionWithVerifyI /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs index ba531b3cb3e60..a4ec6f14b54f2 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs @@ -63,8 +63,7 @@ public void Example_LivenessSession_CreateLivenessSession_ShortVersion_Convenien AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive); - Response response = client.CreateLivenessSession(createLivenessSessionContent); + Response response = client.CreateLivenessSession(LivenessOperationMode.Passive); } [Test] @@ -75,8 +74,7 @@ public async Task Example_LivenessSession_CreateLivenessSession_ShortVersion_Con AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive); - Response response = await client.CreateLivenessSessionAsync(createLivenessSessionContent); + Response response = await client.CreateLivenessSessionAsync(LivenessOperationMode.Passive); } [Test] @@ -133,14 +131,7 @@ public void Example_LivenessSession_CreateLivenessSession_AllParameters_Convenie AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive) - { - SendResultsToClient = true, - DeviceCorrelationIdSetInClient = true, - DeviceCorrelationId = "", - AuthTokenTimeToLiveInSeconds = 1234, - }; - Response response = client.CreateLivenessSession(createLivenessSessionContent); + Response response = client.CreateLivenessSession(LivenessOperationMode.Passive, sendResultsToClient: true, deviceCorrelationIdSetInClient: true, deviceCorrelationId: "", authTokenTimeToLiveInSeconds: 1234); } [Test] @@ -151,14 +142,7 @@ public async Task Example_LivenessSession_CreateLivenessSession_AllParameters_Co AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive) - { - SendResultsToClient = true, - DeviceCorrelationIdSetInClient = true, - DeviceCorrelationId = "", - AuthTokenTimeToLiveInSeconds = 1234, - }; - Response response = await client.CreateLivenessSessionAsync(createLivenessSessionContent); + Response response = await client.CreateLivenessSessionAsync(LivenessOperationMode.Passive, sendResultsToClient: true, deviceCorrelationIdSetInClient: true, deviceCorrelationId: "", authTokenTimeToLiveInSeconds: 1234); } [Test] diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs index 5c4f5ec464f97..91b4bfb98ef77 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs @@ -6,6 +6,8 @@ #nullable disable using System; +using System.Collections.Generic; +using System.Linq; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -63,35 +65,37 @@ public CancerProfilingClient(Uri endpoint, AzureKeyCredential credential, Cancer /// Create Onco Phenotype job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The body of the Onco Phenotype request. + /// The list of patients, including their clinical information and data. + /// Configuration affecting the Onco Phenotype model's inference. /// The cancellation token to use. - /// is null. + /// is null. /// Creates an Onco Phenotype job with the given request body. - /// - public virtual async Task> InferCancerProfileAsync(WaitUntil waitUntil, OncoPhenotypeData oncoPhenotypeData, CancellationToken cancellationToken = default) + /// + public virtual async Task> InferCancerProfileAsync(WaitUntil waitUntil, IEnumerable patients, OncoPhenotypeModelConfiguration configuration = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(oncoPhenotypeData, nameof(oncoPhenotypeData)); + Argument.AssertNotNull(patients, nameof(patients)); - using RequestContent content = oncoPhenotypeData.ToRequestContent(); + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(patients.ToList(), configuration, null); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = await InferCancerProfileAsync(waitUntil, content, context).ConfigureAwait(false); + Operation response = await InferCancerProfileAsync(waitUntil, oncoPhenotypeData.ToRequestContent(), context).ConfigureAwait(false); return ProtocolOperationHelpers.Convert(response, FetchOncoPhenotypeResultsFromOncoPhenotypeResult, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile"); } /// Create Onco Phenotype job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The body of the Onco Phenotype request. + /// The list of patients, including their clinical information and data. + /// Configuration affecting the Onco Phenotype model's inference. /// The cancellation token to use. - /// is null. + /// is null. /// Creates an Onco Phenotype job with the given request body. - /// - public virtual Operation InferCancerProfile(WaitUntil waitUntil, OncoPhenotypeData oncoPhenotypeData, CancellationToken cancellationToken = default) + /// + public virtual Operation InferCancerProfile(WaitUntil waitUntil, IEnumerable patients, OncoPhenotypeModelConfiguration configuration = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(oncoPhenotypeData, nameof(oncoPhenotypeData)); + Argument.AssertNotNull(patients, nameof(patients)); - using RequestContent content = oncoPhenotypeData.ToRequestContent(); + OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(patients.ToList(), configuration, null); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = InferCancerProfile(waitUntil, content, context); + Operation response = InferCancerProfile(waitUntil, oncoPhenotypeData.ToRequestContent(), context); return ProtocolOperationHelpers.Convert(response, FetchOncoPhenotypeResultsFromOncoPhenotypeResult, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile"); } @@ -105,7 +109,7 @@ public virtual Operation InferCancerProfile(WaitUntil wait /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -145,7 +149,7 @@ public virtual async Task> InferCancerProfileAsync(WaitUnt /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml index 31f0811326d25..fdb26630f9219 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml @@ -1,7 +1,7 @@ - + This sample shows how to call InferCancerProfileAsync. "); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, new PatientRecord[] { new PatientRecord("") }); -Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); OncoPhenotypeResults responseData = operation.Value; ]]> This sample shows how to call InferCancerProfileAsync with all parameters. @@ -22,7 +21,14 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +OncoPhenotypeModelConfiguration configuration = new OncoPhenotypeModelConfiguration +{ + Verbose = true, + IncludeEvidence = true, + InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, + CheckForCancerCase = true, +}; +Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, new PatientRecord[] { new PatientRecord("") { @@ -43,21 +49,11 @@ OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] CreatedDateTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }}, } -}) -{ - Configuration = new OncoPhenotypeModelConfiguration - { - Verbose = true, - IncludeEvidence = true, - InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, - CheckForCancerCase = true, - }, -}; -Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); +}, configuration: configuration); OncoPhenotypeResults responseData = operation.Value; ]]> - + This sample shows how to call InferCancerProfile. "); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +Operation operation = client.InferCancerProfile(WaitUntil.Completed, new PatientRecord[] { new PatientRecord("") }); -Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); OncoPhenotypeResults responseData = operation.Value; ]]> This sample shows how to call InferCancerProfile with all parameters. @@ -78,7 +73,14 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +OncoPhenotypeModelConfiguration configuration = new OncoPhenotypeModelConfiguration +{ + Verbose = true, + IncludeEvidence = true, + InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, + CheckForCancerCase = true, +}; +Operation operation = client.InferCancerProfile(WaitUntil.Completed, new PatientRecord[] { new PatientRecord("") { @@ -99,17 +101,7 @@ OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] CreatedDateTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }}, } -}) -{ - Configuration = new OncoPhenotypeModelConfiguration - { - Verbose = true, - IncludeEvidence = true, - InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, - CheckForCancerCase = true, - }, -}; -Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); +}, configuration: configuration); OncoPhenotypeResults responseData = operation.Value; ]]> diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/OncoPhenotypeData.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/OncoPhenotypeData.Serialization.cs index be3b45ef4bc44..bb54b0e88cecb 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/OncoPhenotypeData.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/OncoPhenotypeData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Health.Insights.CancerProfiling { - public partial class OncoPhenotypeData : IUtf8JsonSerializable, IJsonModel + internal partial class OncoPhenotypeData : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/OncoPhenotypeData.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/OncoPhenotypeData.cs index a0c5a12d38a0a..4f995e1e02315 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/OncoPhenotypeData.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/OncoPhenotypeData.cs @@ -12,7 +12,7 @@ namespace Azure.Health.Insights.CancerProfiling { /// The body of the Onco Phenotype request. - public partial class OncoPhenotypeData + internal partial class OncoPhenotypeData { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs index 8fc13c5cc0d5d..9dfcc01f7760e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs @@ -80,11 +80,10 @@ public void Example_CancerProfilingClient_InferCancerProfile_ShortVersion_Conven AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + Operation operation = client.InferCancerProfile(WaitUntil.Completed, new PatientRecord[] { new PatientRecord("") }); - Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); OncoPhenotypeResults responseData = operation.Value; } @@ -96,11 +95,10 @@ public async Task Example_CancerProfilingClient_InferCancerProfile_ShortVersion_ AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, new PatientRecord[] { new PatientRecord("") }); - Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); OncoPhenotypeResults responseData = operation.Value; } @@ -274,7 +272,14 @@ public void Example_CancerProfilingClient_InferCancerProfile_AllParameters_Conve AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + OncoPhenotypeModelConfiguration configuration = new OncoPhenotypeModelConfiguration + { + Verbose = true, + IncludeEvidence = true, + InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, + CheckForCancerCase = true, + }; + Operation operation = client.InferCancerProfile(WaitUntil.Completed, new PatientRecord[] { new PatientRecord("") { @@ -295,17 +300,7 @@ public void Example_CancerProfilingClient_InferCancerProfile_AllParameters_Conve CreatedDateTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }}, } - }) - { - Configuration = new OncoPhenotypeModelConfiguration - { - Verbose = true, - IncludeEvidence = true, - InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, - CheckForCancerCase = true, - }, - }; - Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); + }, configuration: configuration); OncoPhenotypeResults responseData = operation.Value; } @@ -317,7 +312,14 @@ public async Task Example_CancerProfilingClient_InferCancerProfile_AllParameters AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + OncoPhenotypeModelConfiguration configuration = new OncoPhenotypeModelConfiguration + { + Verbose = true, + IncludeEvidence = true, + InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, + CheckForCancerCase = true, + }; + Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, new PatientRecord[] { new PatientRecord("") { @@ -338,17 +340,7 @@ public async Task Example_CancerProfilingClient_InferCancerProfile_AllParameters CreatedDateTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }}, } - }) - { - Configuration = new OncoPhenotypeModelConfiguration - { - Verbose = true, - IncludeEvidence = true, - InferenceTypes = { OncoPhenotypeInferenceType.TumorSite }, - CheckForCancerCase = true, - }, - }; - Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); + }, configuration: configuration); OncoPhenotypeResults responseData = operation.Value; } } From fba9bc8749d753db71e50e6680ef5c5ae129f330 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 11 Jul 2024 07:58:28 +0000 Subject: [PATCH 3/7] Update SDK codes st_wo_6 --- .../Generated/DocumentTranslationClient.cs | 29 ++++++++++--------- .../DocumentTranslationModelFactory.cs | 1 + .../SingleDocumentTranslationClient.cs | 27 ++++++++++------- .../StartTranslationDetails.Serialization.cs | 2 +- .../src/Generated/StartTranslationDetails.cs | 2 +- 5 files changed, 35 insertions(+), 26 deletions(-) diff --git a/sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationClient.cs b/sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationClient.cs index 57acb10ae41ef..f5c0a90dd9aa3 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationClient.cs +++ b/sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationClient.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading; using System.Threading.Tasks; using Autorest.CSharp.Core; @@ -815,9 +816,9 @@ public virtual Pageable GetDocumentsStatus(Guid id, int? maxCount, i /// Submit a document translation request to the Document Translation service. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Translation job submission batch request. + /// The input list of documents or folders containing documents. /// The cancellation token to use. - /// is null. + /// is null. /// /// Use this API to submit a bulk (batch) translation request to the Document /// Translation service. @@ -839,20 +840,20 @@ public virtual Pageable GetDocumentsStatus(Guid id, int? maxCount, i /// destination, it will be overwritten. The targetUrl for each target language /// must be unique. /// - public virtual async Task StartTranslationAsync(WaitUntil waitUntil, StartTranslationDetails startTranslationDetails, CancellationToken cancellationToken = default) + public virtual async Task StartTranslationAsync(WaitUntil waitUntil, IEnumerable inputs, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(startTranslationDetails, nameof(startTranslationDetails)); + Argument.AssertNotNull(inputs, nameof(inputs)); - using RequestContent content = startTranslationDetails.ToRequestContent(); + StartTranslationDetails startTranslationDetails = new StartTranslationDetails(inputs.ToList(), null); RequestContext context = FromCancellationToken(cancellationToken); - return await StartTranslationAsync(waitUntil, content, context).ConfigureAwait(false); + return await StartTranslationAsync(waitUntil, startTranslationDetails.ToRequestContent(), context).ConfigureAwait(false); } /// Submit a document translation request to the Document Translation service. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Translation job submission batch request. + /// The input list of documents or folders containing documents. /// The cancellation token to use. - /// is null. + /// is null. /// /// Use this API to submit a bulk (batch) translation request to the Document /// Translation service. @@ -874,13 +875,13 @@ public virtual async Task StartTranslationAsync(WaitUntil waitUntil, /// destination, it will be overwritten. The targetUrl for each target language /// must be unique. /// - public virtual Operation StartTranslation(WaitUntil waitUntil, StartTranslationDetails startTranslationDetails, CancellationToken cancellationToken = default) + public virtual Operation StartTranslation(WaitUntil waitUntil, IEnumerable inputs, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(startTranslationDetails, nameof(startTranslationDetails)); + Argument.AssertNotNull(inputs, nameof(inputs)); - using RequestContent content = startTranslationDetails.ToRequestContent(); + StartTranslationDetails startTranslationDetails = new StartTranslationDetails(inputs.ToList(), null); RequestContext context = FromCancellationToken(cancellationToken); - return StartTranslation(waitUntil, content, context); + return StartTranslation(waitUntil, startTranslationDetails.ToRequestContent(), context); } /// @@ -893,7 +894,7 @@ public virtual Operation StartTranslation(WaitUntil waitUntil, StartTranslationD /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -932,7 +933,7 @@ public virtual async Task StartTranslationAsync(WaitUntil waitUntil, /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationModelFactory.cs b/sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationModelFactory.cs index 3f53271ce03dd..2aa1b42b81a37 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationModelFactory.cs +++ b/sdk/translation/Azure.AI.Translation.Document/src/Generated/DocumentTranslationModelFactory.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/sdk/translation/Azure.AI.Translation.Document/src/Generated/SingleDocumentTranslationClient.cs b/sdk/translation/Azure.AI.Translation.Document/src/Generated/SingleDocumentTranslationClient.cs index c2f94f2c81701..125d4136e8f38 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/Generated/SingleDocumentTranslationClient.cs +++ b/sdk/translation/Azure.AI.Translation.Document/src/Generated/SingleDocumentTranslationClient.cs @@ -6,6 +6,9 @@ #nullable disable using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -94,7 +97,8 @@ public SingleDocumentTranslationClient(Uri endpoint, TokenCredential credential, /// The target language must be one of the supported languages included in the translation scope. /// For example if you want to translate the document in German language, then use targetLanguage=de /// - /// Document Translate Request Content. + /// Document to be translated in the form. + /// Glossary-translation memory will be used during translation in the form. /// /// Specifies source language of the input document. /// If this parameter isn't specified, automatic language detection is applied to determine the source language. @@ -110,13 +114,14 @@ public SingleDocumentTranslationClient(Uri endpoint, TokenCredential credential, /// Possible values are: true (default) or false. /// /// The cancellation token to use. - /// or is null. + /// or is null. /// Use this API to submit a single translation request to the Document Translation Service. - public virtual async Task> DocumentTranslateAsync(string targetLanguage, DocumentTranslateContent documentTranslateContent, string sourceLanguage = null, string category = null, bool? allowFallback = null, CancellationToken cancellationToken = default) + public virtual async Task> DocumentTranslateAsync(string targetLanguage, Stream document, IEnumerable glossary = null, string sourceLanguage = null, string category = null, bool? allowFallback = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(targetLanguage, nameof(targetLanguage)); - Argument.AssertNotNull(documentTranslateContent, nameof(documentTranslateContent)); + Argument.AssertNotNull(document, nameof(document)); + DocumentTranslateContent documentTranslateContent = new DocumentTranslateContent(document, glossary?.ToList() as IList ?? new ChangeTrackingList(), null); using MultipartFormDataRequestContent content = documentTranslateContent.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await DocumentTranslateAsync(targetLanguage, content, content.ContentType, sourceLanguage, category, allowFallback, context).ConfigureAwait(false); @@ -129,7 +134,8 @@ public virtual async Task> DocumentTranslateAsync(string ta /// The target language must be one of the supported languages included in the translation scope. /// For example if you want to translate the document in German language, then use targetLanguage=de /// - /// Document Translate Request Content. + /// Document to be translated in the form. + /// Glossary-translation memory will be used during translation in the form. /// /// Specifies source language of the input document. /// If this parameter isn't specified, automatic language detection is applied to determine the source language. @@ -145,13 +151,14 @@ public virtual async Task> DocumentTranslateAsync(string ta /// Possible values are: true (default) or false. /// /// The cancellation token to use. - /// or is null. + /// or is null. /// Use this API to submit a single translation request to the Document Translation Service. - public virtual Response DocumentTranslate(string targetLanguage, DocumentTranslateContent documentTranslateContent, string sourceLanguage = null, string category = null, bool? allowFallback = null, CancellationToken cancellationToken = default) + public virtual Response DocumentTranslate(string targetLanguage, Stream document, IEnumerable glossary = null, string sourceLanguage = null, string category = null, bool? allowFallback = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(targetLanguage, nameof(targetLanguage)); - Argument.AssertNotNull(documentTranslateContent, nameof(documentTranslateContent)); + Argument.AssertNotNull(document, nameof(document)); + DocumentTranslateContent documentTranslateContent = new DocumentTranslateContent(document, glossary?.ToList() as IList ?? new ChangeTrackingList(), null); using MultipartFormDataRequestContent content = documentTranslateContent.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = DocumentTranslate(targetLanguage, content, content.ContentType, sourceLanguage, category, allowFallback, context); @@ -168,7 +175,7 @@ public virtual Response DocumentTranslate(string targetLanguage, Doc /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -227,7 +234,7 @@ public virtual async Task DocumentTranslateAsync(string targetLanguage /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/sdk/translation/Azure.AI.Translation.Document/src/Generated/StartTranslationDetails.Serialization.cs b/sdk/translation/Azure.AI.Translation.Document/src/Generated/StartTranslationDetails.Serialization.cs index 0e0cde37b6ce1..af576a8ab5a5b 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/Generated/StartTranslationDetails.Serialization.cs +++ b/sdk/translation/Azure.AI.Translation.Document/src/Generated/StartTranslationDetails.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Translation.Document { - public partial class StartTranslationDetails : IUtf8JsonSerializable, IJsonModel + internal partial class StartTranslationDetails : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/translation/Azure.AI.Translation.Document/src/Generated/StartTranslationDetails.cs b/sdk/translation/Azure.AI.Translation.Document/src/Generated/StartTranslationDetails.cs index a3b452ac1eaf9..5c29af4d9336f 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/Generated/StartTranslationDetails.cs +++ b/sdk/translation/Azure.AI.Translation.Document/src/Generated/StartTranslationDetails.cs @@ -12,7 +12,7 @@ namespace Azure.AI.Translation.Document { /// Translation job submission batch request. - public partial class StartTranslationDetails + internal partial class StartTranslationDetails { /// /// Keeps track of any properties unknown to the library. From da4c9b806e166b171d57c284b2df16a9272e38ff Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 11 Jul 2024 08:00:49 +0000 Subject: [PATCH 4/7] Update SDK codes mi_pu_4 --- .../AssistantCreationOptions.Serialization.cs | 2 +- .../src/Generated/AssistantCreationOptions.cs | 2 +- .../src/Generated/AssistantsClient.cs | 178 ++- .../src/Generated/AssistantsModelFactory.cs | 57 - ...CreateAndRunThreadOptions.Serialization.cs | 2 +- .../Generated/CreateAndRunThreadOptions.cs | 2 +- .../UpdateAssistantOptions.Serialization.cs | 2 +- .../src/Generated/UpdateAssistantOptions.cs | 2 +- .../AnalyticsPurviewDataMapModelFactory.cs | 135 ++ .../AtlasEntitiesWithExtInfo.Serialization.cs | 4 +- .../src/Generated/AtlasEntitiesWithExtInfo.cs | 8 +- .../AtlasEntityHeaders.Serialization.cs | 2 +- .../src/Generated/AtlasEntityHeaders.cs | 2 +- .../AtlasEntityWithExtInfo.Serialization.cs | 2 +- .../src/Generated/AtlasEntityWithExtInfo.cs | 8 +- .../Generated/AtlasGlossary.Serialization.cs | 6 +- .../src/Generated/AtlasGlossary.cs | 34 +- .../AtlasRelationship.Serialization.cs | 2 +- .../src/Generated/AtlasRelationship.cs | 34 +- .../Generated/AtlasTypesDef.Serialization.cs | 14 +- .../src/Generated/AtlasTypesDef.cs | 18 +- .../AutoCompleteConfig.Serialization.cs | 2 +- .../src/Generated/AutoCompleteConfig.cs | 2 +- ...sificationAssociateConfig.Serialization.cs | 2 +- .../ClassificationAssociateConfig.cs | 2 +- .../src/Generated/Discovery.cs | 168 ++- .../src/Generated/Docs/Discovery.xml | 116 +- .../src/Generated/Docs/Entity.xml | 1084 ++++++++--------- .../src/Generated/Docs/Glossary.xml | 928 +++++++------- .../src/Generated/Docs/Relationship.xml | 156 +-- .../src/Generated/Docs/TypeDefinition.xml | 300 +++-- .../src/Generated/Entity.cs | 240 ++-- .../src/Generated/Glossary.cs | 745 +++++++++-- .../MoveEntitiesConfig.Serialization.cs | 2 +- .../src/Generated/MoveEntitiesConfig.cs | 2 +- .../Generated/QueryConfig.Serialization.cs | 2 +- .../src/Generated/QueryConfig.cs | 2 +- .../src/Generated/Relationship.cs | 181 ++- .../Generated/SuggestConfig.Serialization.cs | 2 +- .../src/Generated/SuggestConfig.cs | 2 +- .../src/Generated/TypeDefinition.cs | 187 ++- .../Generated/Samples/Samples_Discovery.cs | 104 +- .../tests/Generated/Samples/Samples_Entity.cs | 532 ++++---- .../Generated/Samples/Samples_Glossary.cs | 912 +++++++------- .../Generated/Samples/Samples_Relationship.cs | 141 +-- .../Samples/Samples_TypeDefinition.cs | 288 +++-- 46 files changed, 3658 insertions(+), 2960 deletions(-) diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantCreationOptions.Serialization.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantCreationOptions.Serialization.cs index 28455a04d327e..8f1b40a59f852 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantCreationOptions.Serialization.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantCreationOptions.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.AI.OpenAI.Assistants { - public partial class AssistantCreationOptions : IUtf8JsonSerializable, IJsonModel + internal partial class AssistantCreationOptions : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantCreationOptions.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantCreationOptions.cs index 34372f5633995..8eb54f2a89846 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantCreationOptions.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantCreationOptions.cs @@ -11,7 +11,7 @@ namespace Azure.AI.OpenAI.Assistants { /// The request details to use when creating a new assistant. - public partial class AssistantCreationOptions + internal partial class AssistantCreationOptions { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsClient.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsClient.cs index 5fac23f167008..1690d2152e41e 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsClient.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsClient.cs @@ -39,30 +39,58 @@ protected AssistantsClient() } /// Creates a new assistant. - /// The request details to use when creating a new assistant. + /// The ID of the model to use. + /// The name of the new assistant. + /// The description of the new assistant. + /// The system instructions for the new assistant to use. + /// The collection of tools to enable for the new assistant. + /// A list of previously uploaded file IDs to attach to the assistant. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - public virtual async Task> CreateAssistantAsync(AssistantCreationOptions assistantCreationOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> CreateAssistantAsync(string model, string name = null, string description = null, string instructions = null, IEnumerable tools = null, IEnumerable fileIds = null, IDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantCreationOptions, nameof(assistantCreationOptions)); + Argument.AssertNotNull(model, nameof(model)); - using RequestContent content = assistantCreationOptions.ToRequestContent(); + AssistantCreationOptions assistantCreationOptions = new AssistantCreationOptions( + model, + name, + description, + instructions, + tools?.ToList() as IList ?? new ChangeTrackingList(), + fileIds?.ToList() as IList ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateAssistantAsync(content, context).ConfigureAwait(false); + Response response = await CreateAssistantAsync(assistantCreationOptions.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(Assistant.FromResponse(response), response); } /// Creates a new assistant. - /// The request details to use when creating a new assistant. + /// The ID of the model to use. + /// The name of the new assistant. + /// The description of the new assistant. + /// The system instructions for the new assistant to use. + /// The collection of tools to enable for the new assistant. + /// A list of previously uploaded file IDs to attach to the assistant. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - public virtual Response CreateAssistant(AssistantCreationOptions assistantCreationOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual Response CreateAssistant(string model, string name = null, string description = null, string instructions = null, IEnumerable tools = null, IEnumerable fileIds = null, IDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantCreationOptions, nameof(assistantCreationOptions)); + Argument.AssertNotNull(model, nameof(model)); - using RequestContent content = assistantCreationOptions.ToRequestContent(); + AssistantCreationOptions assistantCreationOptions = new AssistantCreationOptions( + model, + name, + description, + instructions, + tools?.ToList() as IList ?? new ChangeTrackingList(), + fileIds?.ToList() as IList ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateAssistant(content, context); + Response response = CreateAssistant(assistantCreationOptions.ToRequestContent(), context); return Response.FromValue(Assistant.FromResponse(response), response); } @@ -332,35 +360,61 @@ internal virtual Response GetAssistant(string assistantId, RequestContext contex /// Modifies an existing assistant. /// The ID of the assistant to modify. - /// The request details to use when modifying an existing assistant. + /// The ID of the model to use. + /// The modified name for the assistant to use. + /// The modified description for the assistant to use. + /// The modified system instructions for the new assistant to use. + /// The modified collection of tools to enable for the assistant. + /// The modified list of previously uploaded fileIDs to attach to the assistant. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// or is null. + /// is null. /// is an empty string, and was expected to be non-empty. - public virtual async Task> UpdateAssistantAsync(string assistantId, UpdateAssistantOptions updateAssistantOptions, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAssistantAsync(string assistantId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, IEnumerable fileIds = null, IDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - Argument.AssertNotNull(updateAssistantOptions, nameof(updateAssistantOptions)); - using RequestContent content = updateAssistantOptions.ToRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateAssistantAsync(assistantId, content, context).ConfigureAwait(false); + UpdateAssistantOptions updateAssistantOptions = new UpdateAssistantOptions( + model, + name, + description, + instructions, + tools?.ToList() as IList ?? new ChangeTrackingList(), + fileIds?.ToList() as IList ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await UpdateAssistantAsync(assistantId, updateAssistantOptions.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(Assistant.FromResponse(response), response); } /// Modifies an existing assistant. /// The ID of the assistant to modify. - /// The request details to use when modifying an existing assistant. + /// The ID of the model to use. + /// The modified name for the assistant to use. + /// The modified description for the assistant to use. + /// The modified system instructions for the new assistant to use. + /// The modified collection of tools to enable for the assistant. + /// The modified list of previously uploaded fileIDs to attach to the assistant. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// or is null. + /// is null. /// is an empty string, and was expected to be non-empty. - public virtual Response UpdateAssistant(string assistantId, UpdateAssistantOptions updateAssistantOptions, CancellationToken cancellationToken = default) + public virtual Response UpdateAssistant(string assistantId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, IEnumerable fileIds = null, IDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - Argument.AssertNotNull(updateAssistantOptions, nameof(updateAssistantOptions)); - using RequestContent content = updateAssistantOptions.ToRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateAssistant(assistantId, content, context); + UpdateAssistantOptions updateAssistantOptions = new UpdateAssistantOptions( + model, + name, + description, + instructions, + tools?.ToList() as IList ?? new ChangeTrackingList(), + fileIds?.ToList() as IList ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = UpdateAssistant(assistantId, updateAssistantOptions.ToRequestContent(), context); return Response.FromValue(Assistant.FromResponse(response), response); } @@ -997,30 +1051,26 @@ internal virtual Response InternalUnlinkAssistantFile(string assistantId, string } /// Creates a new thread. Threads contain messages and can be run by assistants. - /// The details used to create a new assistant thread. + /// The initial messages to associate with the new thread. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - public virtual async Task> CreateThreadAsync(AssistantThreadCreationOptions assistantThreadCreationOptions, CancellationToken cancellationToken = default) + public virtual async Task> CreateThreadAsync(IEnumerable messages = null, IDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantThreadCreationOptions, nameof(assistantThreadCreationOptions)); - - using RequestContent content = assistantThreadCreationOptions.ToRequestContent(); + AssistantThreadCreationOptions assistantThreadCreationOptions = new AssistantThreadCreationOptions(messages?.ToList() as IList ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateThreadAsync(content, context).ConfigureAwait(false); + Response response = await CreateThreadAsync(assistantThreadCreationOptions.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(AssistantThread.FromResponse(response), response); } /// Creates a new thread. Threads contain messages and can be run by assistants. - /// The details used to create a new assistant thread. + /// The initial messages to associate with the new thread. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - public virtual Response CreateThread(AssistantThreadCreationOptions assistantThreadCreationOptions, CancellationToken cancellationToken = default) + public virtual Response CreateThread(IEnumerable messages = null, IDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantThreadCreationOptions, nameof(assistantThreadCreationOptions)); - - using RequestContent content = assistantThreadCreationOptions.ToRequestContent(); + AssistantThreadCreationOptions assistantThreadCreationOptions = new AssistantThreadCreationOptions(messages?.ToList() as IList ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateThread(content, context); + Response response = CreateThread(assistantThreadCreationOptions.ToRequestContent(), context); return Response.FromValue(AssistantThread.FromResponse(response), response); } @@ -2751,30 +2801,54 @@ internal virtual Response CancelRun(string threadId, string runId, RequestContex } /// Creates a new assistant thread and immediately starts a run using that new thread. - /// The details used when creating and immediately running a new assistant thread. + /// The ID of the assistant for which the thread should be created. + /// The details used to create the new thread. + /// The overridden model that the assistant should use to run the thread. + /// The overridden system instructions the assistant should use to run the thread. + /// The overridden list of enabled tools the assistant should use to run the thread. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - public virtual async Task> CreateThreadAndRunAsync(CreateAndRunThreadOptions createAndRunThreadOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> CreateThreadAndRunAsync(string assistantId, AssistantThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, IDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createAndRunThreadOptions, nameof(createAndRunThreadOptions)); + Argument.AssertNotNull(assistantId, nameof(assistantId)); - using RequestContent content = createAndRunThreadOptions.ToRequestContent(); + CreateAndRunThreadOptions createAndRunThreadOptions = new CreateAndRunThreadOptions( + assistantId, + thread, + overrideModelName, + overrideInstructions, + overrideTools?.ToList() as IList ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateThreadAndRunAsync(content, context).ConfigureAwait(false); + Response response = await CreateThreadAndRunAsync(createAndRunThreadOptions.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(ThreadRun.FromResponse(response), response); } /// Creates a new assistant thread and immediately starts a run using that new thread. - /// The details used when creating and immediately running a new assistant thread. + /// The ID of the assistant for which the thread should be created. + /// The details used to create the new thread. + /// The overridden model that the assistant should use to run the thread. + /// The overridden system instructions the assistant should use to run the thread. + /// The overridden list of enabled tools the assistant should use to run the thread. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - public virtual Response CreateThreadAndRun(CreateAndRunThreadOptions createAndRunThreadOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual Response CreateThreadAndRun(string assistantId, AssistantThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, IDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createAndRunThreadOptions, nameof(createAndRunThreadOptions)); + Argument.AssertNotNull(assistantId, nameof(assistantId)); - using RequestContent content = createAndRunThreadOptions.ToRequestContent(); + CreateAndRunThreadOptions createAndRunThreadOptions = new CreateAndRunThreadOptions( + assistantId, + thread, + overrideModelName, + overrideInstructions, + overrideTools?.ToList() as IList ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateThreadAndRun(content, context); + Response response = CreateThreadAndRun(createAndRunThreadOptions.ToRequestContent(), context); return Response.FromValue(ThreadRun.FromResponse(response), response); } diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsModelFactory.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsModelFactory.cs index 8b4620e1331ee..2c50a3182c76c 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsModelFactory.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsModelFactory.cs @@ -13,36 +13,6 @@ namespace Azure.AI.OpenAI.Assistants /// Model factory for models. public static partial class AssistantsModelFactory { - /// Initializes a new instance of . - /// The ID of the model to use. - /// The name of the new assistant. - /// The description of the new assistant. - /// The system instructions for the new assistant to use. - /// - /// The collection of tools to enable for the new assistant. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// A list of previously uploaded file IDs to attach to the assistant. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// A new instance for mocking. - public static AssistantCreationOptions AssistantCreationOptions(string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, IEnumerable fileIds = null, IDictionary metadata = null) - { - tools ??= new List(); - fileIds ??= new List(); - metadata ??= new Dictionary(); - - return new AssistantCreationOptions( - model, - name, - description, - instructions, - tools?.ToList(), - fileIds?.ToList(), - metadata, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The role associated with the assistant thread message. Currently, only 'user' is supported when providing initial messages to a new thread. /// The textual content of the initial message. Currently, robust input including images and annotated text may only be provided via a separate call to the create message API. @@ -119,33 +89,6 @@ public static RunError RunError(string code = null, string message = null) return new RunError(code, message, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The ID of the assistant for which the thread should be created. - /// The details used to create the new thread. - /// The overridden model that the assistant should use to run the thread. - /// The overridden system instructions the assistant should use to run the thread. - /// - /// The overridden list of enabled tools the assistant should use to run the thread. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// A new instance for mocking. - public static CreateAndRunThreadOptions CreateAndRunThreadOptions(string assistantId = null, AssistantThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, IDictionary metadata = null) - { - overrideTools ??= new List(); - metadata ??= new Dictionary(); - - return new CreateAndRunThreadOptions( - assistantId, - thread, - overrideModelName, - overrideInstructions, - overrideTools?.ToList(), - metadata, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Information about the message creation associated with this run step. /// A new instance for mocking. diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/CreateAndRunThreadOptions.Serialization.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/CreateAndRunThreadOptions.Serialization.cs index e91fb2d48f485..3cb2728a12257 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/CreateAndRunThreadOptions.Serialization.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/CreateAndRunThreadOptions.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.AI.OpenAI.Assistants { - public partial class CreateAndRunThreadOptions : IUtf8JsonSerializable, IJsonModel + internal partial class CreateAndRunThreadOptions : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/CreateAndRunThreadOptions.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/CreateAndRunThreadOptions.cs index cf9c983195f7d..af3a353bf450f 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/CreateAndRunThreadOptions.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/CreateAndRunThreadOptions.cs @@ -11,7 +11,7 @@ namespace Azure.AI.OpenAI.Assistants { /// The details used when creating and immediately running a new assistant thread. - public partial class CreateAndRunThreadOptions + internal partial class CreateAndRunThreadOptions { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/UpdateAssistantOptions.Serialization.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/UpdateAssistantOptions.Serialization.cs index c9b296e27af2c..c870f033e4e64 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/UpdateAssistantOptions.Serialization.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/UpdateAssistantOptions.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.AI.OpenAI.Assistants { - public partial class UpdateAssistantOptions : IUtf8JsonSerializable, IJsonModel + internal partial class UpdateAssistantOptions : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/UpdateAssistantOptions.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/UpdateAssistantOptions.cs index 85770c825c218..7e71f41d30089 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/UpdateAssistantOptions.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/UpdateAssistantOptions.cs @@ -11,7 +11,7 @@ namespace Azure.AI.OpenAI.Assistants { /// The request details to use when modifying an existing assistant. - public partial class UpdateAssistantOptions + internal partial class UpdateAssistantOptions { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapModelFactory.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapModelFactory.cs index d545a38b54e9b..125fef59f8b8e 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapModelFactory.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AnalyticsPurviewDataMapModelFactory.cs @@ -14,6 +14,17 @@ namespace Azure.Analytics.Purview.DataMap /// Model factory for models. public static partial class AnalyticsPurviewDataMapModelFactory { + /// Initializes a new instance of . + /// The referred entities. + /// An instance of an entity - like hive_table, hive_database. + /// A new instance for mocking. + public static AtlasEntityWithExtInfo AtlasEntityWithExtInfo(IReadOnlyDictionary referredEntities = null, AtlasEntity entity = null) + { + referredEntities ??= new Dictionary(); + + return new AtlasEntityWithExtInfo(referredEntities, entity, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The attributes of the struct. /// The name of the type. @@ -92,6 +103,18 @@ public static EntityMutationResult EntityMutationResult(IReadOnlyDictionary Initializes a new instance of . + /// The referred entities. + /// An array of entities. + /// A new instance for mocking. + public static AtlasEntitiesWithExtInfo AtlasEntitiesWithExtInfo(IReadOnlyDictionary referredEntities = null, IEnumerable entities = null) + { + referredEntities ??= new Dictionary(); + entities ??= new List(); + + return new AtlasEntitiesWithExtInfo(referredEntities, entities?.ToList(), serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// An array of objects. /// The size of the page. @@ -137,6 +160,48 @@ public static ImportInfo ImportInfo(string childObjectName = null, ImportStatus? 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. + /// A new instance for mocking. + public static AtlasGlossary AtlasGlossary(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) + { + classifications ??= new List(); + categories ??= new List(); + terms ??= new List(); + + return new AtlasGlossary( + guid, + classifications?.ToList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + categories?.ToList(), + language, + terms?.ToList(), + usage, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The GUID of the object. /// An array of classifications. @@ -531,6 +596,46 @@ public static LineageRelation LineageRelation(string fromEntityId = null, string return new LineageRelation(fromEntityId, relationshipId, toEntityId, serializedAdditionalRawData: null); } + /// 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. + /// A new instance for mocking. + public static AtlasRelationship AtlasRelationship(IReadOnlyDictionary attributes = null, string typeName = null, string lastModifiedTS = null, long? createTime = null, string createdBy = null, AtlasObjectId end1 = null, AtlasObjectId end2 = null, string guid = null, string homeId = null, string label = null, int? provenanceType = null, StatusAtlasRelationship? status = null, long? updateTime = null, string updatedBy = null, long? version = null) + { + attributes ??= new Dictionary(); + + return new AtlasRelationship( + attributes, + typeName, + lastModifiedTS, + createTime, + createdBy, + end1, + end2, + guid, + homeId, + label, + provenanceType, + status, + updateTime, + updatedBy, + version, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The referred entity header. /// Atlas relationship instance. @@ -652,6 +757,36 @@ public static AtlasTypeDef AtlasTypeDef(TypeCategory? category = null, long? cre serializedAdditionalRawData: null); } + /// 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. + /// A new instance for mocking. + public static AtlasTypesDef AtlasTypesDef(IEnumerable businessMetadataDefs = null, IEnumerable classificationDefs = null, IEnumerable entityDefs = null, IEnumerable enumDefs = null, IEnumerable relationshipDefs = null, IEnumerable structDefs = null, IEnumerable termTemplateDefs = null) + { + businessMetadataDefs ??= new List(); + classificationDefs ??= new List(); + entityDefs ??= new List(); + enumDefs ??= new List(); + relationshipDefs ??= new List(); + structDefs ??= new List(); + termTemplateDefs ??= new List(); + + return new AtlasTypesDef( + businessMetadataDefs?.ToList(), + classificationDefs?.ToList(), + entityDefs?.ToList(), + enumDefs?.ToList(), + relationshipDefs?.ToList(), + structDefs?.ToList(), + termTemplateDefs?.ToList(), + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The enum of type category. /// The GUID of the type definition. 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 index 5988f0efdd369..7d48e9ca97c61 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.Serialization.cs @@ -85,8 +85,8 @@ internal static AtlasEntitiesWithExtInfo DeserializeAtlasEntitiesWithExtInfo(Jso { return null; } - IDictionary referredEntities = default; - IList entities = default; + IReadOnlyDictionary referredEntities = default; + IReadOnlyList entities = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.cs index cabc61e0a28ba..8b7bf774a10d2 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntitiesWithExtInfo.cs @@ -49,7 +49,7 @@ public partial class AtlasEntitiesWithExtInfo private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public AtlasEntitiesWithExtInfo() + internal AtlasEntitiesWithExtInfo() { ReferredEntities = new ChangeTrackingDictionary(); Entities = new ChangeTrackingList(); @@ -59,7 +59,7 @@ public AtlasEntitiesWithExtInfo() /// The referred entities. /// An array of entities. /// Keeps track of any properties unknown to the library. - internal AtlasEntitiesWithExtInfo(IDictionary referredEntities, IList entities, IDictionary serializedAdditionalRawData) + internal AtlasEntitiesWithExtInfo(IReadOnlyDictionary referredEntities, IReadOnlyList entities, IDictionary serializedAdditionalRawData) { ReferredEntities = referredEntities; Entities = entities; @@ -67,8 +67,8 @@ internal AtlasEntitiesWithExtInfo(IDictionary referredEntit } /// The referred entities. - public IDictionary ReferredEntities { get; } + public IReadOnlyDictionary ReferredEntities { get; } /// An array of entities. - public IList Entities { get; } + public IReadOnlyList Entities { get; } } } 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 index f1f746f8fe89e..cded50a7897d7 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Purview.DataMap { - public partial class AtlasEntityHeaders : IUtf8JsonSerializable, IJsonModel + internal partial class AtlasEntityHeaders : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.cs index 7ce217b78f61f..99b6f2ec2fcf8 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityHeaders.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Purview.DataMap { /// An instance of an entity header map. - public partial class AtlasEntityHeaders + internal partial class AtlasEntityHeaders { /// /// Keeps track of any properties unknown to the library. 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 index 551c7673c3790..892b5db7de557 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.Serialization.cs @@ -80,7 +80,7 @@ internal static AtlasEntityWithExtInfo DeserializeAtlasEntityWithExtInfo(JsonEle { return null; } - IDictionary referredEntities = default; + IReadOnlyDictionary referredEntities = default; AtlasEntity entity = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.cs index 565fd8bcea7da..4ffbb4c839d34 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasEntityWithExtInfo.cs @@ -49,7 +49,7 @@ public partial class AtlasEntityWithExtInfo private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public AtlasEntityWithExtInfo() + internal AtlasEntityWithExtInfo() { ReferredEntities = new ChangeTrackingDictionary(); } @@ -58,7 +58,7 @@ public AtlasEntityWithExtInfo() /// 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) + internal AtlasEntityWithExtInfo(IReadOnlyDictionary referredEntities, AtlasEntity entity, IDictionary serializedAdditionalRawData) { ReferredEntities = referredEntities; Entity = entity; @@ -66,8 +66,8 @@ internal AtlasEntityWithExtInfo(IDictionary referredEntitie } /// The referred entities. - public IDictionary ReferredEntities { get; } + public IReadOnlyDictionary ReferredEntities { get; } /// An instance of an entity - like hive_table, hive_database. - public AtlasEntity Entity { get; set; } + public AtlasEntity Entity { get; } } } 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 index ab9f6f9fb3bb2..a8fa0d706b1cb 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.Serialization.cs @@ -155,7 +155,7 @@ internal static AtlasGlossary DeserializeAtlasGlossary(JsonElement element, Mode return null; } string guid = default; - IList classifications = default; + IReadOnlyList classifications = default; string longDescription = default; string name = default; string qualifiedName = default; @@ -165,9 +165,9 @@ internal static AtlasGlossary DeserializeAtlasGlossary(JsonElement element, Mode string createdBy = default; long? updateTime = default; string updatedBy = default; - IList categories = default; + IReadOnlyList categories = default; string language = default; - IList terms = default; + IReadOnlyList terms = default; string usage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.cs index 2ef4e5a22dbd2..0b2f361f7c92d 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasGlossary.cs @@ -46,7 +46,7 @@ public partial class AtlasGlossary private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public AtlasGlossary() + internal AtlasGlossary() { Classifications = new ChangeTrackingList(); Categories = new ChangeTrackingList(); @@ -70,7 +70,7 @@ public AtlasGlossary() /// 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) + internal AtlasGlossary(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, IDictionary serializedAdditionalRawData) { Guid = guid; Classifications = classifications; @@ -91,34 +91,34 @@ internal AtlasGlossary(string guid, IList classifications, } /// The GUID of the object. - public string Guid { get; set; } + public string Guid { get; } /// An array of classifications. - public IList Classifications { get; } + public IReadOnlyList Classifications { get; } /// The long version description. - public string LongDescription { get; set; } + public string LongDescription { get; } /// The name of the glossary object. - public string Name { get; set; } + public string Name { get; } /// The qualified name of the glossary object. - public string QualifiedName { get; set; } + public string QualifiedName { get; } /// The short version of description. - public string ShortDescription { get; set; } + public string ShortDescription { get; } /// ETag for concurrency control. - public string LastModifiedTS { get; set; } + public string LastModifiedTS { get; } /// The created time of the record. - public long? CreateTime { get; set; } + public long? CreateTime { get; } /// The user who created the record. - public string CreatedBy { get; set; } + public string CreatedBy { get; } /// The update time of the record. - public long? UpdateTime { get; set; } + public long? UpdateTime { get; } /// The user who updated the record. - public string UpdatedBy { get; set; } + public string UpdatedBy { get; } /// An array of categories. - public IList Categories { get; } + public IReadOnlyList Categories { get; } /// The language of the glossary. - public string Language { get; set; } + public string Language { get; } /// An array of related term headers. - public IList Terms { get; } + public IReadOnlyList Terms { get; } /// The usage of the glossary. - public string Usage { get; set; } + public string Usage { get; } } } 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 index 66ab0105cab79..e9363f99da7f2 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.Serialization.cs @@ -157,7 +157,7 @@ internal static AtlasRelationship DeserializeAtlasRelationship(JsonElement eleme { return null; } - IDictionary attributes = default; + IReadOnlyDictionary attributes = default; string typeName = default; string lastModifiedTS = default; long? createTime = default; diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.cs index 289973688d333..7221af6a2c0c3 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasRelationship.cs @@ -46,7 +46,7 @@ public partial class AtlasRelationship private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public AtlasRelationship() + internal AtlasRelationship() { Attributes = new ChangeTrackingDictionary(); } @@ -68,7 +68,7 @@ public AtlasRelationship() /// 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) + internal AtlasRelationship(IReadOnlyDictionary 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; @@ -118,34 +118,34 @@ internal AtlasRelationship(IDictionary attributes, string ty /// /// /// - public IDictionary Attributes { get; } + public IReadOnlyDictionary Attributes { get; } /// The name of the type. - public string TypeName { get; set; } + public string TypeName { get; } /// ETag for concurrency control. - public string LastModifiedTS { get; set; } + public string LastModifiedTS { get; } /// The created time of the record. - public long? CreateTime { get; set; } + public long? CreateTime { get; } /// The user who created the record. - public string CreatedBy { get; set; } + public string CreatedBy { get; } /// Reference to an object-instance of a type - like entity. - public AtlasObjectId End1 { get; set; } + public AtlasObjectId End1 { get; } /// Reference to an object-instance of a type - like entity. - public AtlasObjectId End2 { get; set; } + public AtlasObjectId End2 { get; } /// The GUID of the relationship. - public string Guid { get; set; } + public string Guid { get; } /// The home ID of the relationship. - public string HomeId { get; set; } + public string HomeId { get; } /// The label of the relationship. - public string Label { get; set; } + public string Label { get; } /// Used to record the provenance of an instance of an entity or relationship. - public int? ProvenanceType { get; set; } + public int? ProvenanceType { get; } /// The enum of relationship status. - public StatusAtlasRelationship? Status { get; set; } + public StatusAtlasRelationship? Status { get; } /// The update time of the record. - public long? UpdateTime { get; set; } + public long? UpdateTime { get; } /// The user who updated the record. - public string UpdatedBy { get; set; } + public string UpdatedBy { get; } /// The version of the relationship. - public long? Version { get; set; } + public long? Version { 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 index e7e8d64863eed..e8d5b2c2e25d3 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.Serialization.cs @@ -134,13 +134,13 @@ internal static AtlasTypesDef DeserializeAtlasTypesDef(JsonElement element, Mode { return null; } - IList businessMetadataDefs = default; - IList classificationDefs = default; - IList entityDefs = default; - IList enumDefs = default; - IList relationshipDefs = default; - IList structDefs = default; - IList termTemplateDefs = default; + IReadOnlyList businessMetadataDefs = default; + IReadOnlyList classificationDefs = default; + IReadOnlyList entityDefs = default; + IReadOnlyList enumDefs = default; + IReadOnlyList relationshipDefs = default; + IReadOnlyList structDefs = default; + IReadOnlyList termTemplateDefs = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.cs index 33411d2cddfaf..7af5a7c89d426 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AtlasTypesDef.cs @@ -46,7 +46,7 @@ public partial class AtlasTypesDef private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public AtlasTypesDef() + internal AtlasTypesDef() { BusinessMetadataDefs = new ChangeTrackingList(); ClassificationDefs = new ChangeTrackingList(); @@ -66,7 +66,7 @@ public AtlasTypesDef() /// 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) + internal AtlasTypesDef(IReadOnlyList businessMetadataDefs, IReadOnlyList classificationDefs, IReadOnlyList entityDefs, IReadOnlyList enumDefs, IReadOnlyList relationshipDefs, IReadOnlyList structDefs, IReadOnlyList termTemplateDefs, IDictionary serializedAdditionalRawData) { BusinessMetadataDefs = businessMetadataDefs; ClassificationDefs = classificationDefs; @@ -79,18 +79,18 @@ internal AtlasTypesDef(IList businessMetadataDefs, ILi } /// businessMetadataDefs. - public IList BusinessMetadataDefs { get; } + public IReadOnlyList BusinessMetadataDefs { get; } /// An array of classification definitions. - public IList ClassificationDefs { get; } + public IReadOnlyList ClassificationDefs { get; } /// An array of entity definitions. - public IList EntityDefs { get; } + public IReadOnlyList EntityDefs { get; } /// An array of enum definitions. - public IList EnumDefs { get; } + public IReadOnlyList EnumDefs { get; } /// An array of relationship definitions. - public IList RelationshipDefs { get; } + public IReadOnlyList RelationshipDefs { get; } /// An array of struct definitions. - public IList StructDefs { get; } + public IReadOnlyList StructDefs { get; } /// An array of term template definitions. - public IList TermTemplateDefs { get; } + public IReadOnlyList 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 index cbab1107eb0db..9ca6c117bf423 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Purview.DataMap { - public partial class AutoCompleteConfig : IUtf8JsonSerializable, IJsonModel + internal partial class AutoCompleteConfig : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.cs index 3a8c72aa0520b..23cace6fcb93f 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/AutoCompleteConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Purview.DataMap { /// The payload of autocomplete request. - public partial class AutoCompleteConfig + internal partial class AutoCompleteConfig { /// /// Keeps track of any properties unknown to the library. 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 index 247ed8473259d..083de97cf6865 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Purview.DataMap { - public partial class ClassificationAssociateConfig : IUtf8JsonSerializable, IJsonModel + internal partial class ClassificationAssociateConfig : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.cs index b055730daa9d2..cdacd5a920421 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/ClassificationAssociateConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Purview.DataMap { /// The request payload for classification association. - public partial class ClassificationAssociateConfig + internal partial class ClassificationAssociateConfig { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs index 9bda0cb30e054..56546ad2b9a6f 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs @@ -6,6 +6,8 @@ #nullable disable using System; +using System.Collections.Generic; +using System.Linq; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -50,32 +52,66 @@ internal Discovery(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, T } /// Get data using search. - /// The search query of advanced search request. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> QueryAsync(QueryConfig queryConfig, CancellationToken cancellationToken = default) + /// + public virtual async Task> QueryAsync(string keywords = null, int? limit = null, string continuationToken = null, IEnumerable orderby = null, BinaryData filter = null, IEnumerable facets = null, SearchTaxonomySetting taxonomySetting = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(queryConfig, nameof(queryConfig)); - - using RequestContent content = queryConfig.ToRequestContent(); + QueryConfig queryConfig = new QueryConfig( + keywords, + limit, + continuationToken, + orderby?.ToList() as IList ?? new ChangeTrackingList(), + filter, + facets?.ToList() as IList ?? new ChangeTrackingList(), + taxonomySetting, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await QueryAsync(content, context).ConfigureAwait(false); + Response response = await QueryAsync(queryConfig.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(QueryResult.FromResponse(response), response); } /// Get data using search. - /// The search query of advanced search request. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response Query(QueryConfig queryConfig, CancellationToken cancellationToken = default) + /// + public virtual Response Query(string keywords = null, int? limit = null, string continuationToken = null, IEnumerable orderby = null, BinaryData filter = null, IEnumerable facets = null, SearchTaxonomySetting taxonomySetting = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(queryConfig, nameof(queryConfig)); - - using RequestContent content = queryConfig.ToRequestContent(); + QueryConfig queryConfig = new QueryConfig( + keywords, + limit, + continuationToken, + orderby?.ToList() as IList ?? new ChangeTrackingList(), + filter, + facets?.ToList() as IList ?? new ChangeTrackingList(), + taxonomySetting, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = Query(content, context); + Response response = Query(queryConfig.ToRequestContent(), context); return Response.FromValue(QueryResult.FromResponse(response), response); } @@ -89,7 +125,7 @@ public virtual Response Query(QueryConfig queryConfig, Cancellation /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -128,7 +164,7 @@ public virtual async Task QueryAsync(RequestContent content, RequestCo /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -158,32 +194,46 @@ public virtual Response Query(RequestContent content, RequestContext context = n } /// Get search suggestions by query criteria. - /// The payload of suggest request. + /// + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> SuggestAsync(SuggestConfig suggestConfig, CancellationToken cancellationToken = default) + /// + public virtual async Task> SuggestAsync(string keywords = null, int? limit = null, BinaryData filter = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(suggestConfig, nameof(suggestConfig)); - - using RequestContent content = suggestConfig.ToRequestContent(); + SuggestConfig suggestConfig = new SuggestConfig(keywords, limit, filter, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await SuggestAsync(content, context).ConfigureAwait(false); + Response response = await SuggestAsync(suggestConfig.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(SuggestResult.FromResponse(response), response); } /// Get search suggestions by query criteria. - /// The payload of suggest request. + /// + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response Suggest(SuggestConfig suggestConfig, CancellationToken cancellationToken = default) + /// + public virtual Response Suggest(string keywords = null, int? limit = null, BinaryData filter = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(suggestConfig, nameof(suggestConfig)); - - using RequestContent content = suggestConfig.ToRequestContent(); + SuggestConfig suggestConfig = new SuggestConfig(keywords, limit, filter, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = Suggest(content, context); + Response response = Suggest(suggestConfig.ToRequestContent(), context); return Response.FromValue(SuggestResult.FromResponse(response), response); } @@ -197,7 +247,7 @@ public virtual Response Suggest(SuggestConfig suggestConfig, Canc /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -236,7 +286,7 @@ public virtual async Task SuggestAsync(RequestContent content, Request /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -266,32 +316,42 @@ public virtual Response Suggest(RequestContent content, RequestContext context = } /// Get auto complete options. - /// The payload of autocomplete request. + /// + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> AutoCompleteAsync(AutoCompleteConfig autoCompleteConfig, CancellationToken cancellationToken = default) + /// + public virtual async Task> AutoCompleteAsync(string keywords = null, int? limit = null, BinaryData filter = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(autoCompleteConfig, nameof(autoCompleteConfig)); - - using RequestContent content = autoCompleteConfig.ToRequestContent(); + AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(keywords, limit, filter, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await AutoCompleteAsync(content, context).ConfigureAwait(false); + Response response = await AutoCompleteAsync(autoCompleteConfig.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(AutoCompleteResult.FromResponse(response), response); } /// Get auto complete options. - /// The payload of autocomplete request. + /// + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response AutoComplete(AutoCompleteConfig autoCompleteConfig, CancellationToken cancellationToken = default) + /// + public virtual Response AutoComplete(string keywords = null, int? limit = null, BinaryData filter = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(autoCompleteConfig, nameof(autoCompleteConfig)); - - using RequestContent content = autoCompleteConfig.ToRequestContent(); + AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(keywords, limit, filter, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = AutoComplete(content, context); + Response response = AutoComplete(autoCompleteConfig.ToRequestContent(), context); return Response.FromValue(AutoCompleteResult.FromResponse(response), response); } @@ -305,7 +365,7 @@ public virtual Response AutoComplete(AutoCompleteConfig auto /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -344,7 +404,7 @@ public virtual async Task AutoCompleteAsync(RequestContent content, Re /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// 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 index 1095890f2913b..f6dcf0f6f0d64 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml @@ -1,7 +1,7 @@ - + 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); +Response response = await client.QueryAsync(); ]]> 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 +SearchTaxonomySetting taxonomySetting = new SearchTaxonomySetting { - Keywords = "", - Limit = 1234, - ContinuationToken = "", - Orderby = { BinaryData.FromObjectAsJson(new object()) }, - Filter = BinaryData.FromObjectAsJson(new object()), - Facets = {new SearchFacetItem + AssetTypes = { "" }, + Facet = default, +}; +Response response = await client.QueryAsync(keywords: "", limit: 1234, continuationToken: "", orderby: new BinaryData[] +{ + BinaryData.FromObjectAsJson(new object()) +}, filter: BinaryData.FromObjectAsJson(new object()), facets: new SearchFacetItem[] +{ + new SearchFacetItem { Count = 1234, Facet = "", @@ -34,17 +36,11 @@ QueryConfig queryConfig = new QueryConfig Count = SearchSortOrder.Ascend, Value = SearchSortOrder.Ascend, }, - }}, - TaxonomySetting = new SearchTaxonomySetting - { - AssetTypes = { "" }, - Facet = default, - }, -}; -Response response = await client.QueryAsync(queryConfig); + } +}, taxonomySetting: taxonomySetting); ]]> - + 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); +Response response = client.Query(); ]]> 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 +SearchTaxonomySetting taxonomySetting = new SearchTaxonomySetting +{ + AssetTypes = { "" }, + Facet = default, +}; +Response response = client.Query(keywords: "", limit: 1234, continuationToken: "", orderby: new BinaryData[] { - Keywords = "", - Limit = 1234, - ContinuationToken = "", - Orderby = { BinaryData.FromObjectAsJson(new object()) }, - Filter = BinaryData.FromObjectAsJson(new object()), - Facets = {new SearchFacetItem + BinaryData.FromObjectAsJson(new object()) +}, filter: BinaryData.FromObjectAsJson(new object()), facets: new SearchFacetItem[] +{ + new SearchFacetItem { Count = 1234, Facet = "", @@ -77,14 +75,8 @@ QueryConfig queryConfig = new QueryConfig Count = SearchSortOrder.Ascend, Value = SearchSortOrder.Ascend, }, - }}, - TaxonomySetting = new SearchTaxonomySetting - { - AssetTypes = { "" }, - Facet = default, - }, -}; -Response response = client.Query(queryConfig); + } +}, taxonomySetting: taxonomySetting); ]]> @@ -305,7 +297,7 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0]. 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); +Response response = await client.SuggestAsync(); ]]> 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); +Response response = await client.SuggestAsync(keywords: "", limit: 1234, filter: BinaryData.FromObjectAsJson(new object())); ]]> - + 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); +Response response = client.Suggest(); ]]> 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); +Response response = client.Suggest(keywords: "", limit: 1234, filter: BinaryData.FromObjectAsJson(new object())); ]]> @@ -471,7 +449,7 @@ Console.WriteLine(result.GetProperty("value")[0].GetProperty("termTemplate")[0]. 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); +Response response = await client.AutoCompleteAsync(); ]]> 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); +Response response = await client.AutoCompleteAsync(keywords: "", limit: 1234, filter: BinaryData.FromObjectAsJson(new object())); ]]> - + 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); +Response response = client.AutoComplete(); ]]> 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); +Response response = client.AutoComplete(keywords: "", limit: 1234, filter: BinaryData.FromObjectAsJson(new object())); ]]> 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 index 4958aea8ad883..26a436da0c4c1 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml @@ -1,7 +1,7 @@ - + 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); +Response response = await client.CreateOrUpdateAsync(); ]]> 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 +AtlasEntity entity = default; +Response response = await client.CreateOrUpdateAsync(referredEntities: new Dictionary { - ReferredEntities = + ["key"] = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification { Attributes = { @@ -30,76 +40,61 @@ AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo }, TypeName = "", LastModifiedTS = "", - BusinessAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - Classifications = {new AtlasClassification + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + EndTime = "", + StartTime = "", + TimeZone = "", }}, - CreateTime = 1234L, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, 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 = + 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 { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } - }, - Entity = default, -}; -Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); + Id = "", + Info = "", + }} + }, + } +}, entity: entity, 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); +Response response = client.CreateOrUpdate(); ]]> 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 +AtlasEntity entity = default; +Response response = client.CreateOrUpdate(referredEntities: new Dictionary { - ReferredEntities = + ["key"] = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification { Attributes = { @@ -128,73 +133,58 @@ AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo }, TypeName = "", LastModifiedTS = "", - BusinessAttributes = + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { - ["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 = "", - }}, + EndTime = "", + StartTime = "", + TimeZone = "", }}, - CreateTime = 1234L, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, 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 = + 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 { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } - }, - Entity = default, -}; -Response response = client.CreateOrUpdate(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); + Id = "", + Info = "", + }} + }, + } +}, entity: entity, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); ]]> @@ -787,7 +777,7 @@ Console.WriteLine(result.GetProperty("entities")[0].GetProperty("contacts").GetP 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); +Response response = await client.BatchCreateOrUpdateAsync(); ]]> 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 +Response response = await client.BatchCreateOrUpdateAsync(referredEntities: new Dictionary { - ReferredEntities = + ["key"] = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification { Attributes = { @@ -816,76 +815,64 @@ AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo }, TypeName = "", LastModifiedTS = "", - BusinessAttributes = + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { - ["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 = "", - }}, + EndTime = "", + StartTime = "", + TimeZone = "", }}, - CreateTime = 1234L, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, 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 = + 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 { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } - }, - Entities = { default }, -}; -Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); + Id = "", + Info = "", + }} + }, + } +}, entities: new AtlasEntity[] +{ + default +}, 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); +Response response = client.BatchCreateOrUpdate(); ]]> 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 +Response response = client.BatchCreateOrUpdate(referredEntities: new Dictionary { - ReferredEntities = + ["key"] = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification { Attributes = { @@ -914,73 +910,61 @@ AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo }, TypeName = "", LastModifiedTS = "", - BusinessAttributes = + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { - ["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 = "", - }}, + EndTime = "", + StartTime = "", + TimeZone = "", }}, - CreateTime = 1234L, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, 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 = + 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 { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } - }, - Entities = { default }, -}; -Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); + Id = "", + Info = "", + }} + }, + } +}, entities: new AtlasEntity[] +{ + default +}, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); ]]> @@ -1539,7 +1523,7 @@ Console.WriteLine(result.GetProperty("partialUpdatedEntities")[0].GetProperty("m 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); +Response response = await client.AddClassificationAsync(); ]]> 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 +AtlasClassification classification = new AtlasClassification { - Classification = new AtlasClassification + Attributes = { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + ["key"] = BinaryData.FromObjectAsJson(new object()) }, - EntityGuids = { "" }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, }; -Response response = await client.AddClassificationAsync(classificationAssociateConfig); +Response response = await client.AddClassificationAsync(classification: classification, entityGuids: new string[] { "" }); ]]> - + 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); +Response response = client.AddClassification(); ]]> 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 +AtlasClassification classification = new AtlasClassification { - Classification = new AtlasClassification + Attributes = { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + ["key"] = BinaryData.FromObjectAsJson(new object()) }, - EntityGuids = { "" }, + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary + { + EndTime = "", + StartTime = "", + TimeZone = "", + }}, }; -Response response = client.AddClassification(classificationAssociateConfig); +Response response = client.AddClassification(classification: classification, entityGuids: new string[] { "" }); ]]> @@ -3235,7 +3209,7 @@ Console.WriteLine(result.GetProperty("entity").GetProperty("contacts").GetProper 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); +Response response = await client.UpdateByUniqueAttributeAsync(""); ]]> 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 +AtlasEntity entity = default; +Response response = await client.UpdateByUniqueAttributeAsync("", referredEntities: new Dictionary { - ReferredEntities = + ["key"] = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification { Attributes = { @@ -3264,76 +3248,61 @@ AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo }, TypeName = "", LastModifiedTS = "", - BusinessAttributes = + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { - ["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 = "", - }}, + EndTime = "", + StartTime = "", + TimeZone = "", }}, - CreateTime = 1234L, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, 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 = + 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 { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } - }, - Entity = default, -}; -Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo, attribute: ""); + Id = "", + Info = "", + }} + }, + } +}, entity: entity, 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); +Response response = client.UpdateByUniqueAttribute(""); ]]> 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 +AtlasEntity entity = default; +Response response = client.UpdateByUniqueAttribute("", referredEntities: new Dictionary { - ReferredEntities = + ["key"] = new AtlasEntity { - ["key"] = new AtlasEntity + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + Classifications = {new AtlasClassification { Attributes = { @@ -3362,73 +3341,58 @@ AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo }, TypeName = "", LastModifiedTS = "", - BusinessAttributes = + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { - ["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 = "", - }}, + EndTime = "", + StartTime = "", + TimeZone = "", }}, - CreateTime = 1234L, + }}, + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = + { + ["key"] = "" + }, + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, 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 = + 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 { - ["key"] = {new ContactInfo - { - Id = "", - Info = "", - }} - }, - } - }, - Entity = default, -}; -Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo, attribute: ""); + Id = "", + Info = "", + }} + }, + } +}, entity: entity, attribute: ""); ]]> @@ -4397,7 +4361,7 @@ Response response = client.UpdateClassificationsUniqueByAttribute("", 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); +Response> response = await client.BatchSetClassificationsAsync(); ]]> 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 +Response> response = await client.BatchSetClassificationsAsync(guidHeaderMap: new Dictionary { - GuidHeaderMap = + ["key"] = new AtlasEntityHeader { - ["key"] = new AtlasEntityHeader + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + ClassificationNames = { "" }, + Classifications = {new AtlasClassification { Attributes = { @@ -4426,50 +4396,39 @@ AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders }, TypeName = "", LastModifiedTS = "", - ClassificationNames = {""}, - Classifications = {new AtlasClassification + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + EndTime = "", + StartTime = "", + TimeZone = "", }}, + }}, + DisplayText = "", + Guid = "", + IsIncomplete = true, + Labels = { "" }, + MeaningNames = { "" }, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", 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); + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + Status = EntityStatus.Active, + } +}); ]]> - + 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); +Response> response = client.BatchSetClassifications(); ]]> 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 +Response> response = client.BatchSetClassifications(guidHeaderMap: new Dictionary { - GuidHeaderMap = + ["key"] = new AtlasEntityHeader { - ["key"] = new AtlasEntityHeader + Attributes = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + TypeName = "", + LastModifiedTS = "", + ClassificationNames = { "" }, + Classifications = {new AtlasClassification { Attributes = { @@ -4498,47 +4463,36 @@ AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders }, TypeName = "", LastModifiedTS = "", - ClassificationNames = {""}, - Classifications = {new AtlasClassification + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary - { - EndTime = "", - StartTime = "", - TimeZone = "", - }}, + EndTime = "", + StartTime = "", + TimeZone = "", }}, + }}, + DisplayText = "", + Guid = "", + IsIncomplete = true, + Labels = { "" }, + MeaningNames = { "" }, + Meanings = {new AtlasTermAssignmentHeader + { + Confidence = 1234, + CreatedBy = "", + Description = "", 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); + Expression = "", + RelationGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + Status = AtlasTermAssignmentStatus.Discovered, + Steward = "", + TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + }}, + Status = EntityStatus.Active, + } +}); ]]> @@ -5701,7 +5655,7 @@ 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(); -BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); -Response response = await client.ImportBusinessMetadataAsync(businessMetadataOptions); +Response response = await client.ImportBusinessMetadataAsync(null); ]]> This sample shows how to call ImportBusinessMetadataAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); -Response response = await client.ImportBusinessMetadataAsync(businessMetadataOptions); +Response response = await client.ImportBusinessMetadataAsync(null); ]]> - + This sample shows how to call ImportBusinessMetadata. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); -Response response = client.ImportBusinessMetadata(businessMetadataOptions); +Response response = client.ImportBusinessMetadata((Stream)null); ]]> This sample shows how to call ImportBusinessMetadata with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); -Response response = client.ImportBusinessMetadata(businessMetadataOptions); +Response response = client.ImportBusinessMetadata((Stream)null); ]]> @@ -6387,7 +6337,7 @@ Response response = client.AddLabelsByUniqueAttribute("", content, att 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); +Response response = await client.MoveEntitiesToCollectionAsync(""); ]]> 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); +Response response = await client.MoveEntitiesToCollectionAsync("", entityGuids: new string[] { "" }); ]]> - + 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); +Response response = client.MoveEntitiesToCollection(""); ]]> 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); +Response response = client.MoveEntitiesToCollection("", entityGuids: new string[] { "" }); ]]> 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 index 49baec132e30e..775f4a428267d 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml @@ -153,7 +153,7 @@ Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToSt 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); +Response response = await client.CreateAsync(); ]]> 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 +Response response = await client.CreateAsync(guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -190,26 +188,20 @@ AtlasGlossary atlasGlossary = new AtlasGlossary StartTime = "", TimeZone = "", }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", categories: new AtlasRelatedCategoryHeader[] +{ + new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", - }}, - Language = "", - Terms = {new AtlasRelatedTermHeader + } +}, language: "", terms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -218,13 +210,11 @@ AtlasGlossary atlasGlossary = new AtlasGlossary Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, - Usage = "", -}; -Response response = await client.CreateAsync(atlasGlossary); + } +}, usage: ""); ]]> - + 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); +Response response = client.Create(); ]]> 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 +Response response = client.Create(guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -261,26 +249,20 @@ AtlasGlossary atlasGlossary = new AtlasGlossary StartTime = "", TimeZone = "", }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", categories: new AtlasRelatedCategoryHeader[] +{ + new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", - }}, - Language = "", - Terms = {new AtlasRelatedTermHeader + } +}, language: "", terms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -289,10 +271,8 @@ AtlasGlossary atlasGlossary = new AtlasGlossary Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, - Usage = "", -}; -Response response = client.Create(atlasGlossary); + } +}, usage: ""); ]]> @@ -971,7 +951,7 @@ Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToStr 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); +Response response = await client.CreateCategoryAsync(); ]]> 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 +AtlasGlossaryHeader anchor = new AtlasGlossaryHeader { - Guid = "", - Classifications = {new AtlasClassification + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", +}; +AtlasRelatedCategoryHeader parentCategory = default; +Response response = await client.CreateCategoryAsync(guid: "", classifications: new AtlasClassification[] +{ + new AtlasClassification { Attributes = { @@ -1008,32 +993,20 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory StartTime = "", TimeZone = "", }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", anchor: anchor, childrenCategories: new AtlasRelatedCategoryHeader[] +{ + new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", - }}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader + } +}, parentCategory: parentCategory, terms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -1042,12 +1015,11 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory 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); +Response response = client.CreateCategory(); ]]> 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 +AtlasGlossaryHeader anchor = new AtlasGlossaryHeader +{ + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", +}; +AtlasRelatedCategoryHeader parentCategory = default; +Response response = client.CreateCategory(guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -1084,32 +1061,20 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory StartTime = "", TimeZone = "", }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", anchor: anchor, childrenCategories: new AtlasRelatedCategoryHeader[] +{ + new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", - }}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader + } +}, parentCategory: parentCategory, terms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -1118,9 +1083,8 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, -}; -Response response = client.CreateCategory(atlasGlossaryCategory); + } +}); ]]> @@ -1549,7 +1513,7 @@ 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); +Response response = await client.UpdateCategoryAsync(""); ]]> 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 +AtlasGlossaryHeader anchor = new AtlasGlossaryHeader +{ + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", +}; +AtlasRelatedCategoryHeader parentCategory = default; +Response response = await client.UpdateCategoryAsync("", guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -1586,32 +1555,20 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory StartTime = "", TimeZone = "", }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", anchor: anchor, childrenCategories: new AtlasRelatedCategoryHeader[] +{ + new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", - }}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader + } +}, parentCategory: parentCategory, terms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -1620,12 +1577,11 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory 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); +Response response = client.UpdateCategory(""); ]]> 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 +AtlasGlossaryHeader anchor = new AtlasGlossaryHeader { - Guid = "", - Classifications = {new AtlasClassification + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", +}; +AtlasRelatedCategoryHeader parentCategory = default; +Response response = client.UpdateCategory("", guid: "", classifications: new AtlasClassification[] +{ + new AtlasClassification { Attributes = { @@ -1662,32 +1623,20 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory StartTime = "", TimeZone = "", }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", anchor: anchor, childrenCategories: new AtlasRelatedCategoryHeader[] +{ + new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", - }}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader + } +}, parentCategory: parentCategory, terms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -1696,9 +1645,8 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, -}; -Response response = client.UpdateCategory("", atlasGlossaryCategory); + } +}); ]]> @@ -2397,7 +2345,7 @@ 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); +Response response = await client.CreateTermAsync(); ]]> 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 +AtlasGlossaryHeader anchor = new AtlasGlossaryHeader +{ + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", +}; +Response response = await client.CreateTermAsync(guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -2434,25 +2386,13 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm 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 + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", abbreviation: "", templateName: new BinaryData[] +{ + BinaryData.FromObjectAsJson(new object()) +}, anchor: anchor, antonyms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -2461,10 +2401,10 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId + } +}, status: TermStatus.Draft, nickName: "", hierarchyInfo: new PurviewObjectId[] +{ + new PurviewObjectId { Guid = "", TypeName = "", @@ -2480,28 +2420,33 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm { ["key"] = BinaryData.FromObjectAsJson(new object()) }, - }}, - Resources = {new ResourceLink + } +}, resources: new ResourceLink[] +{ + new ResourceLink { DisplayName = "", Url = "", - }}, - Contacts = + } +}, contacts: new Dictionary> +{ + ["key"] = new ContactInfo[] { - ["key"] = {new ContactInfo + new ContactInfo { Id = "", Info = "", - }} - }, - Attributes = - { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) } - }, - AssignedEntities = {new AtlasRelatedObjectId + } +}, attributes: new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}, assignedEntities: new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId { Guid = "", TypeName = "", @@ -2523,34 +2468,57 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm }, RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), RelationshipStatus = StatusAtlasRelationship.Active, - }}, - Categories = {new AtlasTermCategorizationHeader + } +}, categories: new AtlasTermCategorizationHeader[] +{ + 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); + } +}, classifies: new AtlasRelatedTermHeader[] +{ + default +}, examples: new string[] { "" }, isA: new AtlasRelatedTermHeader[] +{ + default +}, preferredTerms: new AtlasRelatedTermHeader[] +{ + default +}, preferredToTerms: new AtlasRelatedTermHeader[] +{ + default +}, replacedBy: new AtlasRelatedTermHeader[] +{ + default +}, replacementTerms: new AtlasRelatedTermHeader[] +{ + default +}, seeAlso: new AtlasRelatedTermHeader[] +{ + default +}, synonyms: new AtlasRelatedTermHeader[] +{ + default +}, translatedTerms: new AtlasRelatedTermHeader[] +{ + default +}, translationTerms: new AtlasRelatedTermHeader[] +{ + default +}, usage: "", validValues: new AtlasRelatedTermHeader[] +{ + default +}, validValuesFor: new AtlasRelatedTermHeader[] +{ + default +}, 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); +Response response = client.CreateTerm(); ]]> 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 +AtlasGlossaryHeader anchor = new AtlasGlossaryHeader +{ + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", +}; +Response response = client.CreateTerm(guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -2587,25 +2559,13 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm 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 + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", abbreviation: "", templateName: new BinaryData[] +{ + BinaryData.FromObjectAsJson(new object()) +}, anchor: anchor, antonyms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -2614,10 +2574,10 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId + } +}, status: TermStatus.Draft, nickName: "", hierarchyInfo: new PurviewObjectId[] +{ + new PurviewObjectId { Guid = "", TypeName = "", @@ -2633,28 +2593,33 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm { ["key"] = BinaryData.FromObjectAsJson(new object()) }, - }}, - Resources = {new ResourceLink + } +}, resources: new ResourceLink[] +{ + new ResourceLink { DisplayName = "", Url = "", - }}, - Contacts = + } +}, contacts: new Dictionary> +{ + ["key"] = new ContactInfo[] { - ["key"] = {new ContactInfo + new ContactInfo { Id = "", Info = "", - }} - }, - Attributes = - { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) } - }, - AssignedEntities = {new AtlasRelatedObjectId + } +}, attributes: new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}, assignedEntities: new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId { Guid = "", TypeName = "", @@ -2676,31 +2641,54 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm }, RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), RelationshipStatus = StatusAtlasRelationship.Active, - }}, - Categories = {new AtlasTermCategorizationHeader + } +}, categories: new AtlasTermCategorizationHeader[] +{ + 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); + } +}, classifies: new AtlasRelatedTermHeader[] +{ + default +}, examples: new string[] { "" }, isA: new AtlasRelatedTermHeader[] +{ + default +}, preferredTerms: new AtlasRelatedTermHeader[] +{ + default +}, preferredToTerms: new AtlasRelatedTermHeader[] +{ + default +}, replacedBy: new AtlasRelatedTermHeader[] +{ + default +}, replacementTerms: new AtlasRelatedTermHeader[] +{ + default +}, seeAlso: new AtlasRelatedTermHeader[] +{ + default +}, synonyms: new AtlasRelatedTermHeader[] +{ + default +}, translatedTerms: new AtlasRelatedTermHeader[] +{ + default +}, translationTerms: new AtlasRelatedTermHeader[] +{ + default +}, usage: "", validValues: new AtlasRelatedTermHeader[] +{ + default +}, validValuesFor: new AtlasRelatedTermHeader[] +{ + default +}, includeTermHierarchy: true); ]]> @@ -3829,7 +3817,7 @@ Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward") 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); +Response response = await client.UpdateTermAsync(""); ]]> 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 +AtlasGlossaryHeader anchor = new AtlasGlossaryHeader +{ + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", +}; +Response response = await client.UpdateTermAsync("", guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -3866,25 +3858,13 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm 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 + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", abbreviation: "", templateName: new BinaryData[] +{ + BinaryData.FromObjectAsJson(new object()) +}, anchor: anchor, antonyms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -3893,10 +3873,10 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId + } +}, status: TermStatus.Draft, nickName: "", hierarchyInfo: new PurviewObjectId[] +{ + new PurviewObjectId { Guid = "", TypeName = "", @@ -3912,28 +3892,33 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm { ["key"] = BinaryData.FromObjectAsJson(new object()) }, - }}, - Resources = {new ResourceLink + } +}, resources: new ResourceLink[] +{ + new ResourceLink { DisplayName = "", Url = "", - }}, - Contacts = + } +}, contacts: new Dictionary> +{ + ["key"] = new ContactInfo[] { - ["key"] = {new ContactInfo + new ContactInfo { Id = "", Info = "", - }} - }, - Attributes = - { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) } - }, - AssignedEntities = {new AtlasRelatedObjectId + } +}, attributes: new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}, assignedEntities: new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId { Guid = "", TypeName = "", @@ -3955,34 +3940,57 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm }, RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), RelationshipStatus = StatusAtlasRelationship.Active, - }}, - Categories = {new AtlasTermCategorizationHeader + } +}, categories: new AtlasTermCategorizationHeader[] +{ + 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); + } +}, classifies: new AtlasRelatedTermHeader[] +{ + default +}, examples: new string[] { "" }, isA: new AtlasRelatedTermHeader[] +{ + default +}, preferredTerms: new AtlasRelatedTermHeader[] +{ + default +}, preferredToTerms: new AtlasRelatedTermHeader[] +{ + default +}, replacedBy: new AtlasRelatedTermHeader[] +{ + default +}, replacementTerms: new AtlasRelatedTermHeader[] +{ + default +}, seeAlso: new AtlasRelatedTermHeader[] +{ + default +}, synonyms: new AtlasRelatedTermHeader[] +{ + default +}, translatedTerms: new AtlasRelatedTermHeader[] +{ + default +}, translationTerms: new AtlasRelatedTermHeader[] +{ + default +}, usage: "", validValues: new AtlasRelatedTermHeader[] +{ + default +}, validValuesFor: new AtlasRelatedTermHeader[] +{ + default +}, 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); +Response response = client.UpdateTerm(""); ]]> 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 +AtlasGlossaryHeader anchor = new AtlasGlossaryHeader +{ + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", +}; +Response response = client.UpdateTerm("", guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -4019,25 +4031,13 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm 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 + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", abbreviation: "", templateName: new BinaryData[] +{ + BinaryData.FromObjectAsJson(new object()) +}, anchor: anchor, antonyms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -4046,10 +4046,10 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId + } +}, status: TermStatus.Draft, nickName: "", hierarchyInfo: new PurviewObjectId[] +{ + new PurviewObjectId { Guid = "", TypeName = "", @@ -4065,28 +4065,33 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm { ["key"] = BinaryData.FromObjectAsJson(new object()) }, - }}, - Resources = {new ResourceLink + } +}, resources: new ResourceLink[] +{ + new ResourceLink { DisplayName = "", Url = "", - }}, - Contacts = + } +}, contacts: new Dictionary> +{ + ["key"] = new ContactInfo[] { - ["key"] = {new ContactInfo + new ContactInfo { Id = "", Info = "", - }} - }, - Attributes = - { - ["key"] = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) } - }, - AssignedEntities = {new AtlasRelatedObjectId + } +}, attributes: new Dictionary> +{ + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } +}, assignedEntities: new AtlasRelatedObjectId[] +{ + new AtlasRelatedObjectId { Guid = "", TypeName = "", @@ -4108,31 +4113,54 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm }, RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), RelationshipStatus = StatusAtlasRelationship.Active, - }}, - Categories = {new AtlasTermCategorizationHeader + } +}, categories: new AtlasTermCategorizationHeader[] +{ + 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); + } +}, classifies: new AtlasRelatedTermHeader[] +{ + default +}, examples: new string[] { "" }, isA: new AtlasRelatedTermHeader[] +{ + default +}, preferredTerms: new AtlasRelatedTermHeader[] +{ + default +}, preferredToTerms: new AtlasRelatedTermHeader[] +{ + default +}, replacedBy: new AtlasRelatedTermHeader[] +{ + default +}, replacementTerms: new AtlasRelatedTermHeader[] +{ + default +}, seeAlso: new AtlasRelatedTermHeader[] +{ + default +}, synonyms: new AtlasRelatedTermHeader[] +{ + default +}, translatedTerms: new AtlasRelatedTermHeader[] +{ + default +}, translationTerms: new AtlasRelatedTermHeader[] +{ + default +}, usage: "", validValues: new AtlasRelatedTermHeader[] +{ + default +}, validValuesFor: new AtlasRelatedTermHeader[] +{ + default +}, includeTermHierarchy: true); ]]> @@ -7165,7 +7193,7 @@ Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToStrin 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); +Response response = await client.UpdateAsync(""); ]]> 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 +Response response = await client.UpdateAsync("", guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -7202,26 +7228,20 @@ AtlasGlossary atlasGlossary = new AtlasGlossary StartTime = "", TimeZone = "", }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", categories: new AtlasRelatedCategoryHeader[] +{ + new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", - }}, - Language = "", - Terms = {new AtlasRelatedTermHeader + } +}, language: "", terms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -7230,13 +7250,11 @@ AtlasGlossary atlasGlossary = new AtlasGlossary Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, - Usage = "", -}; -Response response = await client.UpdateAsync("", atlasGlossary, ignoreTermsAndCategories: true); + } +}, usage: "", 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); +Response response = client.Update(""); ]]> 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 +Response response = client.Update("", guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification + new AtlasClassification { Attributes = { @@ -7273,26 +7289,20 @@ AtlasGlossary atlasGlossary = new AtlasGlossary StartTime = "", TimeZone = "", }}, - }}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader + } +}, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", categories: new AtlasRelatedCategoryHeader[] +{ + new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", - }}, - Language = "", - Terms = {new AtlasRelatedTermHeader + } +}, language: "", terms: new AtlasRelatedTermHeader[] +{ + new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -7301,10 +7311,8 @@ AtlasGlossary atlasGlossary = new AtlasGlossary Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", - }}, - Usage = "", -}; -Response response = client.Update("", atlasGlossary, ignoreTermsAndCategories: true); + } +}, usage: "", ignoreTermsAndCategories: true); ]]> 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 index 6a61cb95f88a9..31a6c962c4d3b 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml @@ -1,7 +1,7 @@ - + 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); +Response response = await client.CreateAsync(); ]]> 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 +AtlasObjectId end1 = new AtlasObjectId { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + Guid = "", TypeName = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - End1 = new AtlasObjectId + UniqueAttributes = { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + ["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); +Response response = client.Create(); ]]> 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 +AtlasObjectId end1 = new AtlasObjectId { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + Guid = "", TypeName = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - End1 = new AtlasObjectId + UniqueAttributes = { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + ["key"] = BinaryData.FromObjectAsJson(new object()) }, - End2 = default, - Guid = "", - HomeId = "", - Label = " @@ -243,7 +209,7 @@ Console.WriteLine(result.GetProperty("updatedBy").ToString()); Console.WriteLine(result.GetProperty("version").ToString()); ]]> - + 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); +Response response = await client.UpdateAsync(); ]]> 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 +AtlasObjectId end1 = new AtlasObjectId { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + Guid = "", TypeName = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - End1 = new AtlasObjectId + UniqueAttributes = { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + ["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); +Response response = client.Update(); ]]> 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 +AtlasObjectId end1 = new AtlasObjectId { - Attributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + Guid = "", TypeName = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - End1 = new AtlasObjectId + UniqueAttributes = { - Guid = "", - TypeName = "", - UniqueAttributes = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, + ["key"] = BinaryData.FromObjectAsJson(new object()) }, - End2 = default, - Guid = "", - HomeId = "", - Label = " 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 index fb412241d3107..e91d65106bbaa 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml @@ -3483,7 +3483,7 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attribu 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); +Response response = await client.BatchCreateAsync(); ]]> 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 +Response response = await client.BatchCreateAsync(businessMetadataDefs: new AtlasBusinessMetadataDef[] { - BusinessMetadataDefs = {new AtlasBusinessMetadataDef + new AtlasBusinessMetadataDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3582,8 +3581,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef ValuesMaxCount = 1234, ValuesMinCount = 1234, }}, - }}, - ClassificationDefs = {new AtlasClassificationDef + } +}, classificationDefs: new AtlasClassificationDef[] +{ + new AtlasClassificationDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3606,8 +3607,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EntityTypes = {""}, SubTypes = {""}, SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef + } +}, entityDefs: new AtlasEntityDef[] +{ + new AtlasEntityDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3650,8 +3653,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef IsLegacyAttribute = true, RelationshipTypeName = "", }}, - }}, - EnumDefs = {new AtlasEnumDef + } +}, enumDefs: new AtlasEnumDef[] +{ + new AtlasEnumDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3677,8 +3682,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Ordinal = 1234, Value = "", }}, - }}, - RelationshipDefs = {new AtlasRelationshipDef + } +}, relationshipDefs: new AtlasRelationshipDef[] +{ + new AtlasRelationshipDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3710,8 +3717,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EndDef2 = default, RelationshipCategory = RelationshipCategory.Association, RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef + } +}, structDefs: new AtlasStructDef[] +{ + new AtlasStructDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3731,8 +3740,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Version = 1234L, LastModifiedTS = "", AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef + } +}, termTemplateDefs: new TermTemplateDef[] +{ + new TermTemplateDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3752,12 +3763,11 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef 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); +Response response = client.BatchCreate(); ]]> 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 +Response response = client.BatchCreate(businessMetadataDefs: new AtlasBusinessMetadataDef[] { - BusinessMetadataDefs = {new AtlasBusinessMetadataDef + new AtlasBusinessMetadataDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3856,8 +3865,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef ValuesMaxCount = 1234, ValuesMinCount = 1234, }}, - }}, - ClassificationDefs = {new AtlasClassificationDef + } +}, classificationDefs: new AtlasClassificationDef[] +{ + new AtlasClassificationDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3880,8 +3891,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EntityTypes = {""}, SubTypes = {""}, SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef + } +}, entityDefs: new AtlasEntityDef[] +{ + new AtlasEntityDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3924,8 +3937,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef IsLegacyAttribute = true, RelationshipTypeName = "", }}, - }}, - EnumDefs = {new AtlasEnumDef + } +}, enumDefs: new AtlasEnumDef[] +{ + new AtlasEnumDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3951,8 +3966,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Ordinal = 1234, Value = "", }}, - }}, - RelationshipDefs = {new AtlasRelationshipDef + } +}, relationshipDefs: new AtlasRelationshipDef[] +{ + new AtlasRelationshipDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -3984,8 +4001,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EndDef2 = default, RelationshipCategory = RelationshipCategory.Association, RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef + } +}, structDefs: new AtlasStructDef[] +{ + new AtlasStructDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -4005,8 +4024,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Version = 1234L, LastModifiedTS = "", AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef + } +}, termTemplateDefs: new TermTemplateDef[] +{ + new TermTemplateDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -4026,9 +4047,8 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Version = 1234L, LastModifiedTS = "", AttributeDefs = {default}, - }}, -}; -Response response = client.BatchCreate(atlasTypesDef); + } +}); ]]> @@ -5373,7 +5393,7 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attribu 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); +Response response = await client.BatchUpdateAsync(); ]]> 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 +Response response = await client.BatchUpdateAsync(businessMetadataDefs: new AtlasBusinessMetadataDef[] { - BusinessMetadataDefs = {new AtlasBusinessMetadataDef + new AtlasBusinessMetadataDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5472,8 +5491,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef ValuesMaxCount = 1234, ValuesMinCount = 1234, }}, - }}, - ClassificationDefs = {new AtlasClassificationDef + } +}, classificationDefs: new AtlasClassificationDef[] +{ + new AtlasClassificationDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5496,8 +5517,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EntityTypes = {""}, SubTypes = {""}, SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef + } +}, entityDefs: new AtlasEntityDef[] +{ + new AtlasEntityDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5540,8 +5563,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef IsLegacyAttribute = true, RelationshipTypeName = "", }}, - }}, - EnumDefs = {new AtlasEnumDef + } +}, enumDefs: new AtlasEnumDef[] +{ + new AtlasEnumDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5567,8 +5592,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Ordinal = 1234, Value = "", }}, - }}, - RelationshipDefs = {new AtlasRelationshipDef + } +}, relationshipDefs: new AtlasRelationshipDef[] +{ + new AtlasRelationshipDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5600,8 +5627,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EndDef2 = default, RelationshipCategory = RelationshipCategory.Association, RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef + } +}, structDefs: new AtlasStructDef[] +{ + new AtlasStructDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5621,8 +5650,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Version = 1234L, LastModifiedTS = "", AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef + } +}, termTemplateDefs: new TermTemplateDef[] +{ + new TermTemplateDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5642,12 +5673,11 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef 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); +Response response = client.BatchUpdate(); ]]> 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 +Response response = client.BatchUpdate(businessMetadataDefs: new AtlasBusinessMetadataDef[] { - BusinessMetadataDefs = {new AtlasBusinessMetadataDef + new AtlasBusinessMetadataDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5746,8 +5775,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef ValuesMaxCount = 1234, ValuesMinCount = 1234, }}, - }}, - ClassificationDefs = {new AtlasClassificationDef + } +}, classificationDefs: new AtlasClassificationDef[] +{ + new AtlasClassificationDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5770,8 +5801,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EntityTypes = {""}, SubTypes = {""}, SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef + } +}, entityDefs: new AtlasEntityDef[] +{ + new AtlasEntityDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5814,8 +5847,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef IsLegacyAttribute = true, RelationshipTypeName = "", }}, - }}, - EnumDefs = {new AtlasEnumDef + } +}, enumDefs: new AtlasEnumDef[] +{ + new AtlasEnumDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5841,8 +5876,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Ordinal = 1234, Value = "", }}, - }}, - RelationshipDefs = {new AtlasRelationshipDef + } +}, relationshipDefs: new AtlasRelationshipDef[] +{ + new AtlasRelationshipDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5874,8 +5911,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EndDef2 = default, RelationshipCategory = RelationshipCategory.Association, RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef + } +}, structDefs: new AtlasStructDef[] +{ + new AtlasStructDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5895,8 +5934,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Version = 1234L, LastModifiedTS = "", AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef + } +}, termTemplateDefs: new TermTemplateDef[] +{ + new TermTemplateDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -5916,9 +5957,8 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Version = 1234L, LastModifiedTS = "", AttributeDefs = {default}, - }}, -}; -Response response = client.BatchUpdate(atlasTypesDef); + } +}); ]]> @@ -7263,7 +7303,7 @@ Console.WriteLine(result.GetProperty("termTemplateDefs")[0].GetProperty("attribu 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); +Response response = await client.BatchDeleteAsync(); ]]> 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 +Response response = await client.BatchDeleteAsync(businessMetadataDefs: new AtlasBusinessMetadataDef[] { - BusinessMetadataDefs = {new AtlasBusinessMetadataDef + new AtlasBusinessMetadataDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7362,8 +7401,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef ValuesMaxCount = 1234, ValuesMinCount = 1234, }}, - }}, - ClassificationDefs = {new AtlasClassificationDef + } +}, classificationDefs: new AtlasClassificationDef[] +{ + new AtlasClassificationDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7386,8 +7427,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EntityTypes = {""}, SubTypes = {""}, SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef + } +}, entityDefs: new AtlasEntityDef[] +{ + new AtlasEntityDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7430,8 +7473,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef IsLegacyAttribute = true, RelationshipTypeName = "", }}, - }}, - EnumDefs = {new AtlasEnumDef + } +}, enumDefs: new AtlasEnumDef[] +{ + new AtlasEnumDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7457,8 +7502,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Ordinal = 1234, Value = "", }}, - }}, - RelationshipDefs = {new AtlasRelationshipDef + } +}, relationshipDefs: new AtlasRelationshipDef[] +{ + new AtlasRelationshipDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7490,8 +7537,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EndDef2 = default, RelationshipCategory = RelationshipCategory.Association, RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef + } +}, structDefs: new AtlasStructDef[] +{ + new AtlasStructDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7511,8 +7560,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Version = 1234L, LastModifiedTS = "", AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef + } +}, termTemplateDefs: new TermTemplateDef[] +{ + new TermTemplateDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7532,12 +7583,11 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef 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); +Response response = client.BatchDelete(); ]]> 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 +Response response = client.BatchDelete(businessMetadataDefs: new AtlasBusinessMetadataDef[] { - BusinessMetadataDefs = {new AtlasBusinessMetadataDef + new AtlasBusinessMetadataDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7636,8 +7685,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef ValuesMaxCount = 1234, ValuesMinCount = 1234, }}, - }}, - ClassificationDefs = {new AtlasClassificationDef + } +}, classificationDefs: new AtlasClassificationDef[] +{ + new AtlasClassificationDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7660,8 +7711,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EntityTypes = {""}, SubTypes = {""}, SuperTypes = {""}, - }}, - EntityDefs = {new AtlasEntityDef + } +}, entityDefs: new AtlasEntityDef[] +{ + new AtlasEntityDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7704,8 +7757,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef IsLegacyAttribute = true, RelationshipTypeName = "", }}, - }}, - EnumDefs = {new AtlasEnumDef + } +}, enumDefs: new AtlasEnumDef[] +{ + new AtlasEnumDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7731,8 +7786,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Ordinal = 1234, Value = "", }}, - }}, - RelationshipDefs = {new AtlasRelationshipDef + } +}, relationshipDefs: new AtlasRelationshipDef[] +{ + new AtlasRelationshipDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7764,8 +7821,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef EndDef2 = default, RelationshipCategory = RelationshipCategory.Association, RelationshipLabel = "", - }}, - StructDefs = {new AtlasStructDef + } +}, structDefs: new AtlasStructDef[] +{ + new AtlasStructDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7785,8 +7844,10 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Version = 1234L, LastModifiedTS = "", AttributeDefs = {default}, - }}, - TermTemplateDefs = {new TermTemplateDef + } +}, termTemplateDefs: new TermTemplateDef[] +{ + new TermTemplateDef { Category = TypeCategory.Primitive, CreateTime = 1234L, @@ -7806,9 +7867,8 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef Version = 1234L, LastModifiedTS = "", AttributeDefs = {default}, - }}, -}; -Response response = client.BatchDelete(atlasTypesDef); + } +}); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs index 369c8f7276b6c..97f8c2fc7ae6f 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs @@ -7,6 +7,8 @@ using System; using System.Collections.Generic; +using System.IO; +using System.Linq; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -60,10 +62,8 @@ internal Entity(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Toke /// 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 referred entities. + /// An instance of an entity - like hive_table, hive_database. /// /// Used to define the update behavior for business attributes when updating /// entities. @@ -73,15 +73,12 @@ internal Entity(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Toke /// 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) + /// + public virtual async Task> CreateOrUpdateAsync(IReadOnlyDictionary referredEntities = null, AtlasEntity entity = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, string collectionId = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); - - using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(referredEntities ?? new ChangeTrackingDictionary(), entity, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateOrUpdateAsync(content, businessAttributeUpdateBehavior?.ToString(), collectionId, context).ConfigureAwait(false); + Response response = await CreateOrUpdateAsync(atlasEntityWithExtInfo.ToRequestContent(), businessAttributeUpdateBehavior?.ToString(), collectionId, context).ConfigureAwait(false); return Response.FromValue(EntityMutationResult.FromResponse(response), response); } @@ -94,10 +91,8 @@ public virtual async Task> CreateOrUpdateAsync(At /// 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 referred entities. + /// An instance of an entity - like hive_table, hive_database. /// /// Used to define the update behavior for business attributes when updating /// entities. @@ -107,15 +102,12 @@ public virtual async Task> CreateOrUpdateAsync(At /// 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) + /// + public virtual Response CreateOrUpdate(IReadOnlyDictionary referredEntities = null, AtlasEntity entity = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, string collectionId = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); - - using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(referredEntities ?? new ChangeTrackingDictionary(), entity, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateOrUpdate(content, businessAttributeUpdateBehavior?.ToString(), collectionId, context); + Response response = CreateOrUpdate(atlasEntityWithExtInfo.ToRequestContent(), businessAttributeUpdateBehavior?.ToString(), collectionId, context); return Response.FromValue(EntityMutationResult.FromResponse(response), response); } @@ -135,7 +127,7 @@ public virtual Response CreateOrUpdate(AtlasEntityWithExtI /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -188,7 +180,7 @@ public virtual async Task CreateOrUpdateAsync(RequestContent content, /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -349,10 +341,8 @@ public virtual Response GetByIds(IEnumerable guid, bool? minExtInfo, boo /// 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 referred entities. + /// An array of entities. /// /// The collection where entities will be moved to. Only specify a value if you /// need to move an entity to another collection. @@ -362,15 +352,12 @@ public virtual Response GetByIds(IEnumerable guid, bool? minExtInfo, boo /// entities. /// /// The cancellation token to use. - /// is null. - /// - public virtual async Task> BatchCreateOrUpdateAsync(AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) + /// + public virtual async Task> BatchCreateOrUpdateAsync(IReadOnlyDictionary referredEntities = null, IEnumerable entities = null, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntitiesWithExtInfo, nameof(atlasEntitiesWithExtInfo)); - - using RequestContent content = atlasEntitiesWithExtInfo.ToRequestContent(); + AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(referredEntities ?? new ChangeTrackingDictionary(), entities?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await BatchCreateOrUpdateAsync(content, collectionId, businessAttributeUpdateBehavior?.ToString(), context).ConfigureAwait(false); + Response response = await BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo.ToRequestContent(), collectionId, businessAttributeUpdateBehavior?.ToString(), context).ConfigureAwait(false); return Response.FromValue(EntityMutationResult.FromResponse(response), response); } @@ -384,10 +371,8 @@ public virtual async Task> BatchCreateOrUpdateAsy /// 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 referred entities. + /// An array of entities. /// /// The collection where entities will be moved to. Only specify a value if you /// need to move an entity to another collection. @@ -397,15 +382,12 @@ public virtual async Task> BatchCreateOrUpdateAsy /// entities. /// /// The cancellation token to use. - /// is null. - /// - public virtual Response BatchCreateOrUpdate(AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) + /// + public virtual Response BatchCreateOrUpdate(IReadOnlyDictionary referredEntities = null, IEnumerable entities = null, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntitiesWithExtInfo, nameof(atlasEntitiesWithExtInfo)); - - using RequestContent content = atlasEntitiesWithExtInfo.ToRequestContent(); + AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(referredEntities ?? new ChangeTrackingDictionary(), entities?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = BatchCreateOrUpdate(content, collectionId, businessAttributeUpdateBehavior?.ToString(), context); + Response response = BatchCreateOrUpdate(atlasEntitiesWithExtInfo.ToRequestContent(), collectionId, businessAttributeUpdateBehavior?.ToString(), context); return Response.FromValue(EntityMutationResult.FromResponse(response), response); } @@ -426,7 +408,7 @@ public virtual Response BatchCreateOrUpdate(AtlasEntitiesW /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -480,7 +462,7 @@ public virtual async Task BatchCreateOrUpdateAsync(RequestContent cont /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -632,32 +614,34 @@ public virtual Response BatchDelete(IEnumerable guid, RequestContext con } /// Associate a classification to multiple entities in bulk. - /// The request payload for classification association. + /// + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task AddClassificationAsync(ClassificationAssociateConfig classificationAssociateConfig, CancellationToken cancellationToken = default) + /// + public virtual async Task AddClassificationAsync(AtlasClassification classification = null, IEnumerable entityGuids = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(classificationAssociateConfig, nameof(classificationAssociateConfig)); - - using RequestContent content = classificationAssociateConfig.ToRequestContent(); + ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(classification, entityGuids?.ToList() as IList ?? new ChangeTrackingList(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await AddClassificationAsync(content, context).ConfigureAwait(false); + Response response = await AddClassificationAsync(classificationAssociateConfig.ToRequestContent(), context).ConfigureAwait(false); return response; } /// Associate a classification to multiple entities in bulk. - /// The request payload for classification association. + /// + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response AddClassification(ClassificationAssociateConfig classificationAssociateConfig, CancellationToken cancellationToken = default) + /// + public virtual Response AddClassification(AtlasClassification classification = null, IEnumerable entityGuids = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(classificationAssociateConfig, nameof(classificationAssociateConfig)); - - using RequestContent content = classificationAssociateConfig.ToRequestContent(); + ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(classification, entityGuids?.ToList() as IList ?? new ChangeTrackingList(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = AddClassification(content, context); + Response response = AddClassification(classificationAssociateConfig.ToRequestContent(), context); return response; } @@ -671,7 +655,7 @@ public virtual Response AddClassification(ClassificationAssociateConfig classifi /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -710,7 +694,7 @@ public virtual async Task AddClassificationAsync(RequestContent conten /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1868,26 +1852,23 @@ public virtual Response GetByUniqueAttribute(string typeName, bool? minExtInfo, /// /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 referred entities. + /// An instance of an entity - 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 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) + /// + public virtual async Task> UpdateByUniqueAttributeAsync(string typeName, IReadOnlyDictionary referredEntities = null, AtlasEntity entity = null, string attribute = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); - Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); - using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(referredEntities ?? new ChangeTrackingDictionary(), entity, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateByUniqueAttributeAsync(typeName, content, attribute, context).ConfigureAwait(false); + Response response = await UpdateByUniqueAttributeAsync(typeName, atlasEntityWithExtInfo.ToRequestContent(), attribute, context).ConfigureAwait(false); return Response.FromValue(EntityMutationResult.FromResponse(response), response); } @@ -1910,26 +1891,23 @@ public virtual async Task> UpdateByUniqueAttribut /// /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 referred entities. + /// An instance of an entity - 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 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) + /// + public virtual Response UpdateByUniqueAttribute(string typeName, IReadOnlyDictionary referredEntities = null, AtlasEntity entity = null, string attribute = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); - Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); - using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(referredEntities ?? new ChangeTrackingDictionary(), entity, null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateByUniqueAttribute(typeName, content, attribute, context); + Response response = UpdateByUniqueAttribute(typeName, atlasEntityWithExtInfo.ToRequestContent(), attribute, context); return Response.FromValue(EntityMutationResult.FromResponse(response), response); } @@ -1958,7 +1936,7 @@ public virtual Response UpdateByUniqueAttribute(string typ /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2019,7 +1997,7 @@ public virtual async Task UpdateByUniqueAttributeAsync(string typeName /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2588,17 +2566,14 @@ public virtual Response UpdateClassificationsUniqueByAttribute(string typeName, } /// Set classifications on entities in bulk. - /// An instance of an entity header map. + /// The description of the guid header map,. /// The cancellation token to use. - /// is null. - /// - public virtual async Task>> BatchSetClassificationsAsync(AtlasEntityHeaders atlasEntityHeaders, CancellationToken cancellationToken = default) + /// + public virtual async Task>> BatchSetClassificationsAsync(IDictionary guidHeaderMap = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntityHeaders, nameof(atlasEntityHeaders)); - - using RequestContent content = atlasEntityHeaders.ToRequestContent(); + AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(guidHeaderMap ?? new ChangeTrackingDictionary(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await BatchSetClassificationsAsync(content, context).ConfigureAwait(false); + Response response = await BatchSetClassificationsAsync(atlasEntityHeaders.ToRequestContent(), context).ConfigureAwait(false); IReadOnlyList value = default; using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); List array = new List(); @@ -2611,17 +2586,14 @@ public virtual async Task>> BatchSetClassificatio } /// Set classifications on entities in bulk. - /// An instance of an entity header map. + /// The description of the guid header map,. /// The cancellation token to use. - /// is null. - /// - public virtual Response> BatchSetClassifications(AtlasEntityHeaders atlasEntityHeaders, CancellationToken cancellationToken = default) + /// + public virtual Response> BatchSetClassifications(IDictionary guidHeaderMap = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntityHeaders, nameof(atlasEntityHeaders)); - - using RequestContent content = atlasEntityHeaders.ToRequestContent(); + AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(guidHeaderMap ?? new ChangeTrackingDictionary(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = BatchSetClassifications(content, context); + Response response = BatchSetClassifications(atlasEntityHeaders.ToRequestContent(), context); IReadOnlyList value = default; using var document = JsonDocument.Parse(response.ContentStream); List array = new List(); @@ -2643,7 +2615,7 @@ public virtual Response> BatchSetClassifications(AtlasEnti /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2682,7 +2654,7 @@ public virtual async Task BatchSetClassificationsAsync(RequestContent /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -3634,14 +3606,15 @@ public virtual Response GetBusinessMetadataTemplate(RequestContext context) } /// Upload the file for creating Business Metadata in BULK. - /// Business metadata to send to the service. + /// InputStream of file. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> ImportBusinessMetadataAsync(BusinessMetadataOptions businessMetadataOptions, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual async Task> ImportBusinessMetadataAsync(Stream file, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(businessMetadataOptions, nameof(businessMetadataOptions)); + Argument.AssertNotNull(file, nameof(file)); + BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(file, null); using MultipartFormDataRequestContent content = businessMetadataOptions.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await ImportBusinessMetadataAsync(content, content.ContentType, context).ConfigureAwait(false); @@ -3649,14 +3622,15 @@ public virtual async Task> ImportBusinessMetadataAsyn } /// Upload the file for creating Business Metadata in BULK. - /// Business metadata to send to the service. + /// InputStream of file. /// The cancellation token to use. - /// is null. - /// - public virtual Response ImportBusinessMetadata(BusinessMetadataOptions businessMetadataOptions, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual Response ImportBusinessMetadata(Stream file, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(businessMetadataOptions, nameof(businessMetadataOptions)); + Argument.AssertNotNull(file, nameof(file)); + BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(file, null); using MultipartFormDataRequestContent content = businessMetadataOptions.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = ImportBusinessMetadata(content, content.ContentType, context); @@ -3673,7 +3647,7 @@ public virtual Response ImportBusinessMetadata(BusinessMetadat /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -3713,7 +3687,7 @@ public virtual async Task ImportBusinessMetadataAsync(RequestContent c /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -4661,35 +4635,33 @@ public virtual Response AddLabelsByUniqueAttribute(string typeName, RequestConte /// Move existing entities to the target collection. /// The collection where entities will be moved to. - /// MoveEntitiesOptions. + /// An array of entity guids to be moved to target collection. /// The cancellation token to use. - /// or is null. - /// - public virtual async Task> MoveEntitiesToCollectionAsync(string collectionId, MoveEntitiesConfig moveEntitiesConfig, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual async Task> MoveEntitiesToCollectionAsync(string collectionId, IEnumerable entityGuids = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(collectionId, nameof(collectionId)); - Argument.AssertNotNull(moveEntitiesConfig, nameof(moveEntitiesConfig)); - using RequestContent content = moveEntitiesConfig.ToRequestContent(); + MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(entityGuids?.ToList() as IList ?? new ChangeTrackingList(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await MoveEntitiesToCollectionAsync(collectionId, content, context).ConfigureAwait(false); + Response response = await MoveEntitiesToCollectionAsync(collectionId, moveEntitiesConfig.ToRequestContent(), 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. + /// An array of entity guids to be moved to target collection. /// The cancellation token to use. - /// or is null. - /// - public virtual Response MoveEntitiesToCollection(string collectionId, MoveEntitiesConfig moveEntitiesConfig, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual Response MoveEntitiesToCollection(string collectionId, IEnumerable entityGuids = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(collectionId, nameof(collectionId)); - Argument.AssertNotNull(moveEntitiesConfig, nameof(moveEntitiesConfig)); - using RequestContent content = moveEntitiesConfig.ToRequestContent(); + MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(entityGuids?.ToList() as IList ?? new ChangeTrackingList(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = MoveEntitiesToCollection(collectionId, content, context); + Response response = MoveEntitiesToCollection(collectionId, moveEntitiesConfig.ToRequestContent(), context); return Response.FromValue(EntityMutationResult.FromResponse(response), response); } @@ -4703,7 +4675,7 @@ public virtual Response MoveEntitiesToCollection(string co /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -4744,7 +4716,7 @@ public virtual async Task MoveEntitiesToCollectionAsync(string collect /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs index 80b03e3909711..1fbc6074cd92c 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -206,32 +207,86 @@ public virtual Response BatchGet(int? limit, int? offset, string sort, bool? ign } /// Create a glossary. - /// The glossary object. + /// 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 cancellation token to use. - /// is null. - /// - public virtual async Task> CreateAsync(AtlasGlossary atlasGlossary, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); - - using RequestContent content = atlasGlossary.ToRequestContent(); + /// + public virtual async Task> CreateAsync(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, CancellationToken cancellationToken = default) + { + AtlasGlossary atlasGlossary = new AtlasGlossary( + guid, + classifications?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + categories?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + language, + terms?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + usage, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateAsync(content, context).ConfigureAwait(false); + Response response = await CreateAsync(atlasGlossary.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(AtlasGlossary.FromResponse(response), response); } /// Create a glossary. - /// The glossary object. + /// 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 cancellation token to use. - /// is null. - /// - public virtual Response Create(AtlasGlossary atlasGlossary, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); - - using RequestContent content = atlasGlossary.ToRequestContent(); + /// + public virtual Response Create(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, CancellationToken cancellationToken = default) + { + AtlasGlossary atlasGlossary = new AtlasGlossary( + guid, + classifications?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + categories?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + language, + terms?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + usage, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = Create(content, context); + Response response = Create(atlasGlossary.ToRequestContent(), context); return Response.FromValue(AtlasGlossary.FromResponse(response), response); } @@ -245,7 +300,7 @@ public virtual Response Create(AtlasGlossary atlasGlossary, Cance /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -284,7 +339,7 @@ public virtual async Task CreateAsync(RequestContent content, RequestC /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -438,32 +493,86 @@ public virtual Response CreateCategories(RequestContent content, RequestContext } /// Create a glossary category. - /// The glossary category. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> CreateCategoryAsync(AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); - - using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + /// + public virtual async Task> CreateCategoryAsync(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, AtlasGlossaryHeader anchor = null, IEnumerable childrenCategories = null, AtlasRelatedCategoryHeader parentCategory = null, IEnumerable terms = null, CancellationToken cancellationToken = default) + { + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory( + guid, + classifications?.ToList() as IList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + anchor, + childrenCategories?.ToList() as IList ?? new ChangeTrackingList(), + parentCategory, + terms?.ToList() as IList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateCategoryAsync(content, context).ConfigureAwait(false); + Response response = await CreateCategoryAsync(atlasGlossaryCategory.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); } /// Create a glossary category. - /// The glossary category. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response CreateCategory(AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); - - using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + /// + public virtual Response CreateCategory(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, AtlasGlossaryHeader anchor = null, IEnumerable childrenCategories = null, AtlasRelatedCategoryHeader parentCategory = null, IEnumerable terms = null, CancellationToken cancellationToken = default) + { + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory( + guid, + classifications?.ToList() as IList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + anchor, + childrenCategories?.ToList() as IList ?? new ChangeTrackingList(), + parentCategory, + terms?.ToList() as IList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateCategory(content, context); + Response response = CreateCategory(atlasGlossaryCategory.ToRequestContent(), context); return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); } @@ -477,7 +586,7 @@ public virtual Response CreateCategory(AtlasGlossaryCateg /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -516,7 +625,7 @@ public virtual async Task CreateCategoryAsync(RequestContent content, /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -657,37 +766,95 @@ public virtual Response GetCategory(string categoryId, RequestContext context) /// Update the given glossary category by its GUID. /// The globally unique identifier of the category. - /// The glossary category. + /// 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. /// The cancellation token to use. - /// or is null. + /// 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) + /// + public virtual async Task> UpdateCategoryAsync(string categoryId, 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, AtlasGlossaryHeader anchor = null, IEnumerable childrenCategories = null, AtlasRelatedCategoryHeader parentCategory = null, IEnumerable terms = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); - Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); - using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory( + guid, + classifications?.ToList() as IList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + anchor, + childrenCategories?.ToList() as IList ?? new ChangeTrackingList(), + parentCategory, + terms?.ToList() as IList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateCategoryAsync(categoryId, content, context).ConfigureAwait(false); + Response response = await UpdateCategoryAsync(categoryId, atlasGlossaryCategory.ToRequestContent(), 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 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. /// The cancellation token to use. - /// or is null. + /// is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual Response UpdateCategory(string categoryId, AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) + /// + public virtual Response UpdateCategory(string categoryId, 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, AtlasGlossaryHeader anchor = null, IEnumerable childrenCategories = null, AtlasRelatedCategoryHeader parentCategory = null, IEnumerable terms = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); - Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); - using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory( + guid, + classifications?.ToList() as IList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + anchor, + childrenCategories?.ToList() as IList ?? new ChangeTrackingList(), + parentCategory, + terms?.ToList() as IList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateCategory(categoryId, content, context); + Response response = UpdateCategory(categoryId, atlasGlossaryCategory.ToRequestContent(), context); return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); } @@ -701,7 +868,7 @@ public virtual Response UpdateCategory(string categoryId, /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -743,7 +910,7 @@ public virtual async Task UpdateCategoryAsync(string categoryId, Reque /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1290,34 +1457,184 @@ public virtual Response GetCategoryTerms(string categoryId, int? limit, int? off } /// Create a glossary term. - /// The glossary term. + /// 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. /// 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)); - - using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + /// + public virtual async Task> CreateTermAsync(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, string abbreviation = null, IEnumerable templateName = null, AtlasGlossaryHeader anchor = null, IEnumerable antonyms = null, TermStatus? status = null, string nickName = null, IEnumerable hierarchyInfo = null, IEnumerable resources = null, IDictionary> contacts = null, IDictionary> attributes = null, IEnumerable assignedEntities = null, IEnumerable categories = null, IEnumerable classifies = null, IEnumerable examples = null, IEnumerable isA = null, IEnumerable preferredTerms = null, IEnumerable preferredToTerms = null, IEnumerable replacedBy = null, IEnumerable replacementTerms = null, IEnumerable seeAlso = null, IEnumerable synonyms = null, IEnumerable translatedTerms = null, IEnumerable translationTerms = null, string usage = null, IEnumerable validValues = null, IEnumerable validValuesFor = null, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm( + guid, + classifications?.ToList() as IList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + abbreviation, + templateName?.ToList() as IList ?? new ChangeTrackingList(), + anchor, + antonyms?.ToList() as IList ?? new ChangeTrackingList(), + status, + nickName, + hierarchyInfo?.ToList() as IList ?? new ChangeTrackingList(), + resources?.ToList() as IList ?? new ChangeTrackingList(), + contacts ?? new ChangeTrackingDictionary>(), + attributes ?? new ChangeTrackingDictionary>(), + assignedEntities?.ToList() as IList ?? new ChangeTrackingList(), + categories?.ToList() as IList ?? new ChangeTrackingList(), + classifies?.ToList() as IList ?? new ChangeTrackingList(), + examples?.ToList() as IList ?? new ChangeTrackingList(), + isA?.ToList() as IList ?? new ChangeTrackingList(), + preferredTerms?.ToList() as IList ?? new ChangeTrackingList(), + preferredToTerms?.ToList() as IList ?? new ChangeTrackingList(), + replacedBy?.ToList() as IList ?? new ChangeTrackingList(), + replacementTerms?.ToList() as IList ?? new ChangeTrackingList(), + seeAlso?.ToList() as IList ?? new ChangeTrackingList(), + synonyms?.ToList() as IList ?? new ChangeTrackingList(), + translatedTerms?.ToList() as IList ?? new ChangeTrackingList(), + translationTerms?.ToList() as IList ?? new ChangeTrackingList(), + usage, + validValues?.ToList() as IList ?? new ChangeTrackingList(), + validValuesFor?.ToList() as IList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateTermAsync(content, includeTermHierarchy, context).ConfigureAwait(false); + Response response = await CreateTermAsync(atlasGlossaryTerm.ToRequestContent(), includeTermHierarchy, context).ConfigureAwait(false); return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); } /// Create a glossary term. - /// The glossary term. + /// 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. /// 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)); - - using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + /// + public virtual Response CreateTerm(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, string abbreviation = null, IEnumerable templateName = null, AtlasGlossaryHeader anchor = null, IEnumerable antonyms = null, TermStatus? status = null, string nickName = null, IEnumerable hierarchyInfo = null, IEnumerable resources = null, IDictionary> contacts = null, IDictionary> attributes = null, IEnumerable assignedEntities = null, IEnumerable categories = null, IEnumerable classifies = null, IEnumerable examples = null, IEnumerable isA = null, IEnumerable preferredTerms = null, IEnumerable preferredToTerms = null, IEnumerable replacedBy = null, IEnumerable replacementTerms = null, IEnumerable seeAlso = null, IEnumerable synonyms = null, IEnumerable translatedTerms = null, IEnumerable translationTerms = null, string usage = null, IEnumerable validValues = null, IEnumerable validValuesFor = null, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + { + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm( + guid, + classifications?.ToList() as IList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + abbreviation, + templateName?.ToList() as IList ?? new ChangeTrackingList(), + anchor, + antonyms?.ToList() as IList ?? new ChangeTrackingList(), + status, + nickName, + hierarchyInfo?.ToList() as IList ?? new ChangeTrackingList(), + resources?.ToList() as IList ?? new ChangeTrackingList(), + contacts ?? new ChangeTrackingDictionary>(), + attributes ?? new ChangeTrackingDictionary>(), + assignedEntities?.ToList() as IList ?? new ChangeTrackingList(), + categories?.ToList() as IList ?? new ChangeTrackingList(), + classifies?.ToList() as IList ?? new ChangeTrackingList(), + examples?.ToList() as IList ?? new ChangeTrackingList(), + isA?.ToList() as IList ?? new ChangeTrackingList(), + preferredTerms?.ToList() as IList ?? new ChangeTrackingList(), + preferredToTerms?.ToList() as IList ?? new ChangeTrackingList(), + replacedBy?.ToList() as IList ?? new ChangeTrackingList(), + replacementTerms?.ToList() as IList ?? new ChangeTrackingList(), + seeAlso?.ToList() as IList ?? new ChangeTrackingList(), + synonyms?.ToList() as IList ?? new ChangeTrackingList(), + translatedTerms?.ToList() as IList ?? new ChangeTrackingList(), + translationTerms?.ToList() as IList ?? new ChangeTrackingList(), + usage, + validValues?.ToList() as IList ?? new ChangeTrackingList(), + validValuesFor?.ToList() as IList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateTerm(content, includeTermHierarchy, context); + Response response = CreateTerm(atlasGlossaryTerm.ToRequestContent(), includeTermHierarchy, context); return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); } @@ -1331,7 +1648,7 @@ public virtual Response CreateTerm(AtlasGlossaryTerm atlasGlo /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1371,7 +1688,7 @@ public virtual async Task CreateTermAsync(RequestContent content, bool /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1513,39 +1830,193 @@ public virtual Response GetTerm(string termId, RequestContext context) /// Update the given glossary term by its GUID. /// The globally unique identifier for glossary term. - /// The glossary term. + /// 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. /// Whether include term hierarchy. /// The cancellation token to use. - /// or is null. + /// 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) + /// + public virtual async Task> UpdateTermAsync(string termId, 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, string abbreviation = null, IEnumerable templateName = null, AtlasGlossaryHeader anchor = null, IEnumerable antonyms = null, TermStatus? status = null, string nickName = null, IEnumerable hierarchyInfo = null, IEnumerable resources = null, IDictionary> contacts = null, IDictionary> attributes = null, IEnumerable assignedEntities = null, IEnumerable categories = null, IEnumerable classifies = null, IEnumerable examples = null, IEnumerable isA = null, IEnumerable preferredTerms = null, IEnumerable preferredToTerms = null, IEnumerable replacedBy = null, IEnumerable replacementTerms = null, IEnumerable seeAlso = null, IEnumerable synonyms = null, IEnumerable translatedTerms = null, IEnumerable translationTerms = null, string usage = null, IEnumerable validValues = null, IEnumerable validValuesFor = null, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(termId, nameof(termId)); - Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); - using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm( + guid, + classifications?.ToList() as IList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + abbreviation, + templateName?.ToList() as IList ?? new ChangeTrackingList(), + anchor, + antonyms?.ToList() as IList ?? new ChangeTrackingList(), + status, + nickName, + hierarchyInfo?.ToList() as IList ?? new ChangeTrackingList(), + resources?.ToList() as IList ?? new ChangeTrackingList(), + contacts ?? new ChangeTrackingDictionary>(), + attributes ?? new ChangeTrackingDictionary>(), + assignedEntities?.ToList() as IList ?? new ChangeTrackingList(), + categories?.ToList() as IList ?? new ChangeTrackingList(), + classifies?.ToList() as IList ?? new ChangeTrackingList(), + examples?.ToList() as IList ?? new ChangeTrackingList(), + isA?.ToList() as IList ?? new ChangeTrackingList(), + preferredTerms?.ToList() as IList ?? new ChangeTrackingList(), + preferredToTerms?.ToList() as IList ?? new ChangeTrackingList(), + replacedBy?.ToList() as IList ?? new ChangeTrackingList(), + replacementTerms?.ToList() as IList ?? new ChangeTrackingList(), + seeAlso?.ToList() as IList ?? new ChangeTrackingList(), + synonyms?.ToList() as IList ?? new ChangeTrackingList(), + translatedTerms?.ToList() as IList ?? new ChangeTrackingList(), + translationTerms?.ToList() as IList ?? new ChangeTrackingList(), + usage, + validValues?.ToList() as IList ?? new ChangeTrackingList(), + validValuesFor?.ToList() as IList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateTermAsync(termId, content, includeTermHierarchy, context).ConfigureAwait(false); + Response response = await UpdateTermAsync(termId, atlasGlossaryTerm.ToRequestContent(), 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. + /// 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. /// Whether include term hierarchy. /// The cancellation token to use. - /// or is null. + /// 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) + /// + public virtual Response UpdateTerm(string termId, 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, string abbreviation = null, IEnumerable templateName = null, AtlasGlossaryHeader anchor = null, IEnumerable antonyms = null, TermStatus? status = null, string nickName = null, IEnumerable hierarchyInfo = null, IEnumerable resources = null, IDictionary> contacts = null, IDictionary> attributes = null, IEnumerable assignedEntities = null, IEnumerable categories = null, IEnumerable classifies = null, IEnumerable examples = null, IEnumerable isA = null, IEnumerable preferredTerms = null, IEnumerable preferredToTerms = null, IEnumerable replacedBy = null, IEnumerable replacementTerms = null, IEnumerable seeAlso = null, IEnumerable synonyms = null, IEnumerable translatedTerms = null, IEnumerable translationTerms = null, string usage = null, IEnumerable validValues = null, IEnumerable validValuesFor = null, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(termId, nameof(termId)); - Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); - using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm( + guid, + classifications?.ToList() as IList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + abbreviation, + templateName?.ToList() as IList ?? new ChangeTrackingList(), + anchor, + antonyms?.ToList() as IList ?? new ChangeTrackingList(), + status, + nickName, + hierarchyInfo?.ToList() as IList ?? new ChangeTrackingList(), + resources?.ToList() as IList ?? new ChangeTrackingList(), + contacts ?? new ChangeTrackingDictionary>(), + attributes ?? new ChangeTrackingDictionary>(), + assignedEntities?.ToList() as IList ?? new ChangeTrackingList(), + categories?.ToList() as IList ?? new ChangeTrackingList(), + classifies?.ToList() as IList ?? new ChangeTrackingList(), + examples?.ToList() as IList ?? new ChangeTrackingList(), + isA?.ToList() as IList ?? new ChangeTrackingList(), + preferredTerms?.ToList() as IList ?? new ChangeTrackingList(), + preferredToTerms?.ToList() as IList ?? new ChangeTrackingList(), + replacedBy?.ToList() as IList ?? new ChangeTrackingList(), + replacementTerms?.ToList() as IList ?? new ChangeTrackingList(), + seeAlso?.ToList() as IList ?? new ChangeTrackingList(), + synonyms?.ToList() as IList ?? new ChangeTrackingList(), + translatedTerms?.ToList() as IList ?? new ChangeTrackingList(), + translationTerms?.ToList() as IList ?? new ChangeTrackingList(), + usage, + validValues?.ToList() as IList ?? new ChangeTrackingList(), + validValuesFor?.ToList() as IList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateTerm(termId, content, includeTermHierarchy, context); + Response response = UpdateTerm(termId, atlasGlossaryTerm.ToRequestContent(), includeTermHierarchy, context); return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); } @@ -1559,7 +2030,7 @@ public virtual Response UpdateTerm(string termId, AtlasGlossa /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1602,7 +2073,7 @@ public virtual async Task UpdateTermAsync(string termId, RequestConten /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2665,39 +3136,97 @@ public virtual Response GetGlossary(string glossaryId, RequestContext context) /// Update the given glossary. /// The globally unique identifier for glossary. - /// The glossary object. + /// 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. /// Whether ignore terms and categories. /// The cancellation token to use. - /// or is null. + /// 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) + /// + public virtual async Task> UpdateAsync(string glossaryId, 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, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); - Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); - using RequestContent content = atlasGlossary.ToRequestContent(); + AtlasGlossary atlasGlossary = new AtlasGlossary( + guid, + classifications?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + categories?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + language, + terms?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + usage, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateAsync(glossaryId, content, ignoreTermsAndCategories, context).ConfigureAwait(false); + Response response = await UpdateAsync(glossaryId, atlasGlossary.ToRequestContent(), ignoreTermsAndCategories, context).ConfigureAwait(false); return Response.FromValue(AtlasGlossary.FromResponse(response), response); } /// Update the given glossary. /// The globally unique identifier for glossary. - /// The glossary object. + /// 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. /// Whether ignore terms and categories. /// The cancellation token to use. - /// or is null. + /// 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) + /// + public virtual Response Update(string glossaryId, 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, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); - Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); - using RequestContent content = atlasGlossary.ToRequestContent(); + AtlasGlossary atlasGlossary = new AtlasGlossary( + guid, + classifications?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + longDescription, + name, + qualifiedName, + shortDescription, + lastModifiedTS, + createTime, + createdBy, + updateTime, + updatedBy, + categories?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + language, + terms?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + usage, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = Update(glossaryId, content, ignoreTermsAndCategories, context); + Response response = Update(glossaryId, atlasGlossary.ToRequestContent(), ignoreTermsAndCategories, context); return Response.FromValue(AtlasGlossary.FromResponse(response), response); } @@ -2711,7 +3240,7 @@ public virtual Response Update(string glossaryId, AtlasGlossary a /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2754,7 +3283,7 @@ public virtual async Task UpdateAsync(string glossaryId, RequestConten /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// 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 index cf9e515286522..06f6e09e23eb4 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Purview.DataMap { - public partial class MoveEntitiesConfig : IUtf8JsonSerializable, IJsonModel + internal partial class MoveEntitiesConfig : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.cs index 112ad5709b699..bacd20692cb08 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/MoveEntitiesConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Purview.DataMap { /// MoveEntitiesOptions. - public partial class MoveEntitiesConfig + internal partial class MoveEntitiesConfig { /// /// Keeps track of any properties unknown to the library. 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 index fa8b0823342e0..f3f040d5b2faa 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Purview.DataMap { - public partial class QueryConfig : IUtf8JsonSerializable, IJsonModel + internal partial class QueryConfig : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.cs index ef106784dbe38..100cbab838bff 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/QueryConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Purview.DataMap { /// The search query of advanced search request. - public partial class QueryConfig + internal partial class QueryConfig { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs index 584290f5b3fc2..ca063a4a1b9bb 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -47,32 +48,86 @@ internal Relationship(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline } /// Create a new relationship between entities. - /// Atlas relationship instance. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> CreateAsync(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + /// + public virtual async Task> CreateAsync(IReadOnlyDictionary attributes = null, string typeName = null, string lastModifiedTS = null, long? createTime = null, string createdBy = null, AtlasObjectId end1 = null, AtlasObjectId end2 = null, string guid = null, string homeId = null, string label = null, int? provenanceType = null, StatusAtlasRelationship? status = null, long? updateTime = null, string updatedBy = null, long? version = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); - - using RequestContent content = atlasRelationship.ToRequestContent(); + AtlasRelationship atlasRelationship = new AtlasRelationship( + attributes ?? new ChangeTrackingDictionary(), + typeName, + lastModifiedTS, + createTime, + createdBy, + end1, + end2, + guid, + homeId, + label, + provenanceType, + status, + updateTime, + updatedBy, + version, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateAsync(content, context).ConfigureAwait(false); + Response response = await CreateAsync(atlasRelationship.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(AtlasRelationship.FromResponse(response), response); } /// Create a new relationship between entities. - /// Atlas relationship instance. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response Create(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + /// + public virtual Response Create(IReadOnlyDictionary attributes = null, string typeName = null, string lastModifiedTS = null, long? createTime = null, string createdBy = null, AtlasObjectId end1 = null, AtlasObjectId end2 = null, string guid = null, string homeId = null, string label = null, int? provenanceType = null, StatusAtlasRelationship? status = null, long? updateTime = null, string updatedBy = null, long? version = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); - - using RequestContent content = atlasRelationship.ToRequestContent(); + AtlasRelationship atlasRelationship = new AtlasRelationship( + attributes ?? new ChangeTrackingDictionary(), + typeName, + lastModifiedTS, + createTime, + createdBy, + end1, + end2, + guid, + homeId, + label, + provenanceType, + status, + updateTime, + updatedBy, + version, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = Create(content, context); + Response response = Create(atlasRelationship.ToRequestContent(), context); return Response.FromValue(AtlasRelationship.FromResponse(response), response); } @@ -86,7 +141,7 @@ public virtual Response Create(AtlasRelationship atlasRelatio /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -125,7 +180,7 @@ public virtual async Task CreateAsync(RequestContent content, RequestC /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -155,32 +210,86 @@ public virtual Response Create(RequestContent content, RequestContext context = } /// Update an existing relationship between entities. - /// Atlas relationship instance. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> UpdateAsync(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + /// + public virtual async Task> UpdateAsync(IReadOnlyDictionary attributes = null, string typeName = null, string lastModifiedTS = null, long? createTime = null, string createdBy = null, AtlasObjectId end1 = null, AtlasObjectId end2 = null, string guid = null, string homeId = null, string label = null, int? provenanceType = null, StatusAtlasRelationship? status = null, long? updateTime = null, string updatedBy = null, long? version = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); - - using RequestContent content = atlasRelationship.ToRequestContent(); + AtlasRelationship atlasRelationship = new AtlasRelationship( + attributes ?? new ChangeTrackingDictionary(), + typeName, + lastModifiedTS, + createTime, + createdBy, + end1, + end2, + guid, + homeId, + label, + provenanceType, + status, + updateTime, + updatedBy, + version, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateAsync(content, context).ConfigureAwait(false); + Response response = await UpdateAsync(atlasRelationship.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(AtlasRelationship.FromResponse(response), response); } /// Update an existing relationship between entities. - /// Atlas relationship instance. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response Update(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + /// + public virtual Response Update(IReadOnlyDictionary attributes = null, string typeName = null, string lastModifiedTS = null, long? createTime = null, string createdBy = null, AtlasObjectId end1 = null, AtlasObjectId end2 = null, string guid = null, string homeId = null, string label = null, int? provenanceType = null, StatusAtlasRelationship? status = null, long? updateTime = null, string updatedBy = null, long? version = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); - - using RequestContent content = atlasRelationship.ToRequestContent(); + AtlasRelationship atlasRelationship = new AtlasRelationship( + attributes ?? new ChangeTrackingDictionary(), + typeName, + lastModifiedTS, + createTime, + createdBy, + end1, + end2, + guid, + homeId, + label, + provenanceType, + status, + updateTime, + updatedBy, + version, + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = Update(content, context); + Response response = Update(atlasRelationship.ToRequestContent(), context); return Response.FromValue(AtlasRelationship.FromResponse(response), response); } @@ -194,7 +303,7 @@ public virtual Response Update(AtlasRelationship atlasRelatio /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -233,7 +342,7 @@ public virtual async Task UpdateAsync(RequestContent content, RequestC /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// 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 index a0bcff9095876..7426b96742958 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.Serialization.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Analytics.Purview.DataMap { - public partial class SuggestConfig : IUtf8JsonSerializable, IJsonModel + internal partial class SuggestConfig : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.cs index e7460baf7ba85..0780a1fec8c0a 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/SuggestConfig.cs @@ -11,7 +11,7 @@ namespace Azure.Analytics.Purview.DataMap { /// The payload of suggest request. - public partial class SuggestConfig + internal partial class SuggestConfig { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs index adf1eea92bc49..f0e7017a02af1 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -1782,17 +1783,28 @@ public virtual Response GetTypeDefinition(bool? includeTermTemplate, string type /// created. /// Any changes to the existing definitions will be discarded. /// - /// The definitions of types. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> BatchCreateAsync(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); - - using RequestContent content = atlasTypesDef.ToRequestContent(); + /// + public virtual async Task> BatchCreateAsync(IEnumerable businessMetadataDefs = null, IEnumerable classificationDefs = null, IEnumerable entityDefs = null, IEnumerable enumDefs = null, IEnumerable relationshipDefs = null, IEnumerable structDefs = null, IEnumerable termTemplateDefs = null, CancellationToken cancellationToken = default) + { + AtlasTypesDef atlasTypesDef = new AtlasTypesDef( + businessMetadataDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + classificationDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + entityDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + enumDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + relationshipDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + structDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + termTemplateDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await BatchCreateAsync(content, context).ConfigureAwait(false); + Response response = await BatchCreateAsync(atlasTypesDef.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(AtlasTypesDef.FromResponse(response), response); } @@ -1801,17 +1813,28 @@ public virtual async Task> BatchCreateAsync(AtlasTypesDe /// created. /// Any changes to the existing definitions will be discarded. /// - /// The definitions of types. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response BatchCreate(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); - - using RequestContent content = atlasTypesDef.ToRequestContent(); + /// + public virtual Response BatchCreate(IEnumerable businessMetadataDefs = null, IEnumerable classificationDefs = null, IEnumerable entityDefs = null, IEnumerable enumDefs = null, IEnumerable relationshipDefs = null, IEnumerable structDefs = null, IEnumerable termTemplateDefs = null, CancellationToken cancellationToken = default) + { + AtlasTypesDef atlasTypesDef = new AtlasTypesDef( + businessMetadataDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + classificationDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + entityDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + enumDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + relationshipDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + structDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + termTemplateDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = BatchCreate(content, context); + Response response = BatchCreate(atlasTypesDef.ToRequestContent(), context); return Response.FromValue(AtlasTypesDef.FromResponse(response), response); } @@ -1827,7 +1850,7 @@ public virtual Response BatchCreate(AtlasTypesDef atlasTypesDef, /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1868,7 +1891,7 @@ public virtual async Task BatchCreateAsync(RequestContent content, Req /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1901,17 +1924,28 @@ public virtual Response BatchCreate(RequestContent content, RequestContext conte /// Update all types in bulk, changes detected in the type definitions would be /// persisted. /// - /// The definitions of types. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> BatchUpdateAsync(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); - - using RequestContent content = atlasTypesDef.ToRequestContent(); + /// + public virtual async Task> BatchUpdateAsync(IEnumerable businessMetadataDefs = null, IEnumerable classificationDefs = null, IEnumerable entityDefs = null, IEnumerable enumDefs = null, IEnumerable relationshipDefs = null, IEnumerable structDefs = null, IEnumerable termTemplateDefs = null, CancellationToken cancellationToken = default) + { + AtlasTypesDef atlasTypesDef = new AtlasTypesDef( + businessMetadataDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + classificationDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + entityDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + enumDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + relationshipDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + structDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + termTemplateDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await BatchUpdateAsync(content, context).ConfigureAwait(false); + Response response = await BatchUpdateAsync(atlasTypesDef.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(AtlasTypesDef.FromResponse(response), response); } @@ -1919,17 +1953,28 @@ public virtual async Task> BatchUpdateAsync(AtlasTypesDe /// Update all types in bulk, changes detected in the type definitions would be /// persisted. /// - /// The definitions of types. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response BatchUpdate(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); - - using RequestContent content = atlasTypesDef.ToRequestContent(); + /// + public virtual Response BatchUpdate(IEnumerable businessMetadataDefs = null, IEnumerable classificationDefs = null, IEnumerable entityDefs = null, IEnumerable enumDefs = null, IEnumerable relationshipDefs = null, IEnumerable structDefs = null, IEnumerable termTemplateDefs = null, CancellationToken cancellationToken = default) + { + AtlasTypesDef atlasTypesDef = new AtlasTypesDef( + businessMetadataDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + classificationDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + entityDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + enumDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + relationshipDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + structDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + termTemplateDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = BatchUpdate(content, context); + Response response = BatchUpdate(atlasTypesDef.ToRequestContent(), context); return Response.FromValue(AtlasTypesDef.FromResponse(response), response); } @@ -1944,7 +1989,7 @@ public virtual Response BatchUpdate(AtlasTypesDef atlasTypesDef, /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1984,7 +2029,7 @@ public virtual async Task BatchUpdateAsync(RequestContent content, Req /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2014,32 +2059,54 @@ public virtual Response BatchUpdate(RequestContent content, RequestContext conte } /// Delete API for all types in bulk. - /// The definitions of types. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual async Task BatchDeleteAsync(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); - - using RequestContent content = atlasTypesDef.ToRequestContent(); + /// + public virtual async Task BatchDeleteAsync(IEnumerable businessMetadataDefs = null, IEnumerable classificationDefs = null, IEnumerable entityDefs = null, IEnumerable enumDefs = null, IEnumerable relationshipDefs = null, IEnumerable structDefs = null, IEnumerable termTemplateDefs = null, CancellationToken cancellationToken = default) + { + AtlasTypesDef atlasTypesDef = new AtlasTypesDef( + businessMetadataDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + classificationDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + entityDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + enumDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + relationshipDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + structDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + termTemplateDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await BatchDeleteAsync(content, context).ConfigureAwait(false); + Response response = await BatchDeleteAsync(atlasTypesDef.ToRequestContent(), context).ConfigureAwait(false); return response; } /// Delete API for all types in bulk. - /// The definitions of types. + /// 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. /// The cancellation token to use. - /// is null. - /// - public virtual Response BatchDelete(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); - - using RequestContent content = atlasTypesDef.ToRequestContent(); + /// + public virtual Response BatchDelete(IEnumerable businessMetadataDefs = null, IEnumerable classificationDefs = null, IEnumerable entityDefs = null, IEnumerable enumDefs = null, IEnumerable relationshipDefs = null, IEnumerable structDefs = null, IEnumerable termTemplateDefs = null, CancellationToken cancellationToken = default) + { + AtlasTypesDef atlasTypesDef = new AtlasTypesDef( + businessMetadataDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + classificationDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + entityDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + enumDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + relationshipDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + structDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + termTemplateDefs?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), + null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = BatchDelete(content, context); + Response response = BatchDelete(atlasTypesDef.ToRequestContent(), context); return response; } @@ -2053,7 +2120,7 @@ public virtual Response BatchDelete(AtlasTypesDef atlasTypesDef, CancellationTok /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2092,7 +2159,7 @@ public virtual async Task BatchDeleteAsync(RequestContent content, Req /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// 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 index a4a0aebb4e846..08de6929c37d7 100644 --- 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 @@ -54,8 +54,7 @@ public void Example_Discovery_Query_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - QueryConfig queryConfig = new QueryConfig(); - Response response = client.Query(queryConfig); + Response response = client.Query(); } [Test] @@ -66,8 +65,7 @@ public async Task Example_Discovery_Query_ShortVersion_Convenience_Async() 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); + Response response = await client.QueryAsync(); } [Test] @@ -272,14 +270,17 @@ public void Example_Discovery_Query_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - QueryConfig queryConfig = new QueryConfig + SearchTaxonomySetting taxonomySetting = new SearchTaxonomySetting { - Keywords = "", - Limit = 1234, - ContinuationToken = "", - Orderby = { BinaryData.FromObjectAsJson(new object()) }, - Filter = BinaryData.FromObjectAsJson(new object()), - Facets = {new SearchFacetItem + AssetTypes = { "" }, + Facet = default, + }; + Response response = client.Query(keywords: "", limit: 1234, continuationToken: "", orderby: new BinaryData[] + { +BinaryData.FromObjectAsJson(new object()) + }, filter: BinaryData.FromObjectAsJson(new object()), facets: new SearchFacetItem[] + { +new SearchFacetItem { Count = 1234, Facet = "", @@ -288,14 +289,8 @@ public void Example_Discovery_Query_AllParameters_Convenience() Count = SearchSortOrder.Ascend, Value = SearchSortOrder.Ascend, }, -}}, - TaxonomySetting = new SearchTaxonomySetting - { - AssetTypes = { "" }, - Facet = default, - }, - }; - Response response = client.Query(queryConfig); +} + }, taxonomySetting: taxonomySetting); } [Test] @@ -306,14 +301,17 @@ public async Task Example_Discovery_Query_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - QueryConfig queryConfig = new QueryConfig + SearchTaxonomySetting taxonomySetting = new SearchTaxonomySetting + { + AssetTypes = { "" }, + Facet = default, + }; + Response response = await client.QueryAsync(keywords: "", limit: 1234, continuationToken: "", orderby: new BinaryData[] { - Keywords = "", - Limit = 1234, - ContinuationToken = "", - Orderby = { BinaryData.FromObjectAsJson(new object()) }, - Filter = BinaryData.FromObjectAsJson(new object()), - Facets = {new SearchFacetItem +BinaryData.FromObjectAsJson(new object()) + }, filter: BinaryData.FromObjectAsJson(new object()), facets: new SearchFacetItem[] + { +new SearchFacetItem { Count = 1234, Facet = "", @@ -322,14 +320,8 @@ public async Task Example_Discovery_Query_AllParameters_Convenience_Async() Count = SearchSortOrder.Ascend, Value = SearchSortOrder.Ascend, }, -}}, - TaxonomySetting = new SearchTaxonomySetting - { - AssetTypes = { "" }, - Facet = default, - }, - }; - Response response = await client.QueryAsync(queryConfig); +} + }, taxonomySetting: taxonomySetting); } [Test] @@ -370,8 +362,7 @@ public void Example_Discovery_Suggest_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - SuggestConfig suggestConfig = new SuggestConfig(); - Response response = client.Suggest(suggestConfig); + Response response = client.Suggest(); } [Test] @@ -382,8 +373,7 @@ public async Task Example_Discovery_Suggest_ShortVersion_Convenience_Async() 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); + Response response = await client.SuggestAsync(); } [Test] @@ -484,13 +474,7 @@ public void Example_Discovery_Suggest_AllParameters_Convenience() 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); + Response response = client.Suggest(keywords: "", limit: 1234, filter: BinaryData.FromObjectAsJson(new object())); } [Test] @@ -501,13 +485,7 @@ public async Task Example_Discovery_Suggest_AllParameters_Convenience_Async() 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); + Response response = await client.SuggestAsync(keywords: "", limit: 1234, filter: BinaryData.FromObjectAsJson(new object())); } [Test] @@ -548,8 +526,7 @@ public void Example_Discovery_AutoComplete_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(); - Response response = client.AutoComplete(autoCompleteConfig); + Response response = client.AutoComplete(); } [Test] @@ -560,8 +537,7 @@ public async Task Example_Discovery_AutoComplete_ShortVersion_Convenience_Async( 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); + Response response = await client.AutoCompleteAsync(); } [Test] @@ -614,13 +590,7 @@ public void Example_Discovery_AutoComplete_AllParameters_Convenience() 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); + Response response = client.AutoComplete(keywords: "", limit: 1234, filter: BinaryData.FromObjectAsJson(new object())); } [Test] @@ -631,13 +601,7 @@ public async Task Example_Discovery_AutoComplete_AllParameters_Convenience_Async 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); + Response response = await client.AutoCompleteAsync(keywords: "", limit: 1234, filter: BinaryData.FromObjectAsJson(new object())); } } } 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 index bb809859f3af6..98502f581ae97 100644 --- 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 @@ -56,8 +56,7 @@ public void Example_Entity_CreateOrUpdate_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); - Response response = client.CreateOrUpdate(atlasEntityWithExtInfo); + Response response = client.CreateOrUpdate(); } [Test] @@ -68,8 +67,7 @@ public async Task Example_Entity_CreateOrUpdate_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); - Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo); + Response response = await client.CreateOrUpdateAsync(); } [Test] @@ -404,23 +402,22 @@ public void Example_Entity_CreateOrUpdate_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + AtlasEntity entity = default; + Response response = client.CreateOrUpdate(referredEntities: new Dictionary { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = + ["key"] = new AtlasEntity + { + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Classifications = {new AtlasClassification + Classifications = {new AtlasClassification { Attributes = { @@ -438,17 +435,17 @@ public void Example_Entity_CreateOrUpdate_AllParameters_Convenience() TimeZone = "", }}, }}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = { ["key"] = "" }, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader { Confidence = 1234, CreatedBy = "", @@ -460,17 +457,17 @@ public void Example_Entity_CreateOrUpdate_AllParameters_Convenience() Steward = "", TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), }}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = { ["key"] = {new ContactInfo { @@ -478,11 +475,8 @@ public void Example_Entity_CreateOrUpdate_AllParameters_Convenience() Info = "", }} }, -} -}, - Entity = default, - }; - Response response = client.CreateOrUpdate(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); + } + }, entity: entity, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); } [Test] @@ -493,23 +487,22 @@ public async Task Example_Entity_CreateOrUpdate_AllParameters_Convenience_Async( TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + AtlasEntity entity = default; + Response response = await client.CreateOrUpdateAsync(referredEntities: new Dictionary { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = + ["key"] = new AtlasEntity + { + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Classifications = {new AtlasClassification + Classifications = {new AtlasClassification { Attributes = { @@ -527,17 +520,17 @@ public async Task Example_Entity_CreateOrUpdate_AllParameters_Convenience_Async( TimeZone = "", }}, }}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = { ["key"] = "" }, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader { Confidence = 1234, CreatedBy = "", @@ -549,17 +542,17 @@ public async Task Example_Entity_CreateOrUpdate_AllParameters_Convenience_Async( Steward = "", TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), }}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = { ["key"] = {new ContactInfo { @@ -567,11 +560,8 @@ public async Task Example_Entity_CreateOrUpdate_AllParameters_Convenience_Async( Info = "", }} }, -} -}, - Entity = default, - }; - Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); + } + }, entity: entity, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); } [Test] @@ -866,8 +856,7 @@ public void Example_Entity_BatchCreateOrUpdate_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); - Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo); + Response response = client.BatchCreateOrUpdate(); } [Test] @@ -878,8 +867,7 @@ public async Task Example_Entity_BatchCreateOrUpdate_ShortVersion_Convenience_As TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); - Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo); + Response response = await client.BatchCreateOrUpdateAsync(); } [Test] @@ -1222,23 +1210,21 @@ public void Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo + Response response = client.BatchCreateOrUpdate(referredEntities: new Dictionary { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = + ["key"] = new AtlasEntity + { + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Classifications = {new AtlasClassification + Classifications = {new AtlasClassification { Attributes = { @@ -1256,17 +1242,17 @@ public void Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience() TimeZone = "", }}, }}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = { ["key"] = "" }, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader { Confidence = 1234, CreatedBy = "", @@ -1278,17 +1264,17 @@ public void Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience() Steward = "", TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), }}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = { ["key"] = {new ContactInfo { @@ -1296,11 +1282,11 @@ public void Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience() Info = "", }} }, -} -}, - Entities = { default }, - }; - Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); + } + }, entities: new AtlasEntity[] + { +default + }, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); } [Test] @@ -1311,23 +1297,21 @@ public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience_A TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo + Response response = await client.BatchCreateOrUpdateAsync(referredEntities: new Dictionary { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = + ["key"] = new AtlasEntity + { + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Classifications = {new AtlasClassification + Classifications = {new AtlasClassification { Attributes = { @@ -1345,17 +1329,17 @@ public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience_A TimeZone = "", }}, }}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = { ["key"] = "" }, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader { Confidence = 1234, CreatedBy = "", @@ -1367,17 +1351,17 @@ public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience_A Steward = "", TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), }}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = { ["key"] = {new ContactInfo { @@ -1385,11 +1369,11 @@ public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience_A Info = "", }} }, -} -}, - Entities = { default }, - }; - Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); + } + }, entities: new AtlasEntity[] + { +default + }, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); } [Test] @@ -1640,8 +1624,7 @@ public void Example_Entity_AddClassification_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); - Response response = client.AddClassification(classificationAssociateConfig); + Response response = client.AddClassification(); } [Test] @@ -1652,8 +1635,7 @@ public async Task Example_Entity_AddClassification_ShortVersion_Convenience_Asyn TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); - Response response = await client.AddClassificationAsync(classificationAssociateConfig); + Response response = await client.AddClassificationAsync(); } [Test] @@ -1746,29 +1728,25 @@ public void Example_Entity_AddClassification_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig + AtlasClassification classification = new AtlasClassification { - Classification = new AtlasClassification - { - Attributes = + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { EndTime = "", StartTime = "", TimeZone = "", }}, - }, - EntityGuids = { "" }, }; - Response response = client.AddClassification(classificationAssociateConfig); + Response response = client.AddClassification(classification: classification, entityGuids: new string[] { "" }); } [Test] @@ -1779,29 +1757,25 @@ public async Task Example_Entity_AddClassification_AllParameters_Convenience_Asy TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig + AtlasClassification classification = new AtlasClassification { - Classification = new AtlasClassification - { - Attributes = + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, - TypeName = "", - LastModifiedTS = "", - EntityGuid = "", - EntityStatus = EntityStatus.Active, - RemovePropagationsOnEntityDelete = true, - ValidityPeriods = {new TimeBoundary + TypeName = "", + LastModifiedTS = "", + EntityGuid = "", + EntityStatus = EntityStatus.Active, + RemovePropagationsOnEntityDelete = true, + ValidityPeriods = {new TimeBoundary { EndTime = "", StartTime = "", TimeZone = "", }}, - }, - EntityGuids = { "" }, }; - Response response = await client.AddClassificationAsync(classificationAssociateConfig); + Response response = await client.AddClassificationAsync(classification: classification, entityGuids: new string[] { "" }); } [Test] @@ -3452,8 +3426,7 @@ public void Example_Entity_UpdateByUniqueAttribute_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); - Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo); + Response response = client.UpdateByUniqueAttribute(""); } [Test] @@ -3464,8 +3437,7 @@ public async Task Example_Entity_UpdateByUniqueAttribute_ShortVersion_Convenienc TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); - Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo); + Response response = await client.UpdateByUniqueAttributeAsync(""); } [Test] @@ -3800,23 +3772,22 @@ public void Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + AtlasEntity entity = default; + Response response = client.UpdateByUniqueAttribute("", referredEntities: new Dictionary { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = + ["key"] = new AtlasEntity + { + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Classifications = {new AtlasClassification + Classifications = {new AtlasClassification { Attributes = { @@ -3834,17 +3805,17 @@ public void Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience() TimeZone = "", }}, }}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = { ["key"] = "" }, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader { Confidence = 1234, CreatedBy = "", @@ -3856,17 +3827,17 @@ public void Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience() Steward = "", TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), }}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = { ["key"] = {new ContactInfo { @@ -3874,11 +3845,8 @@ public void Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience() Info = "", }} }, -} -}, - Entity = default, - }; - Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo, attribute: ""); + } + }, entity: entity, attribute: ""); } [Test] @@ -3889,23 +3857,22 @@ public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenien TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + AtlasEntity entity = default; + Response response = await client.UpdateByUniqueAttributeAsync("", referredEntities: new Dictionary { - ReferredEntities = -{ -["key"] = new AtlasEntity -{ -Attributes = + ["key"] = new AtlasEntity + { + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -TypeName = "", -LastModifiedTS = "", -BusinessAttributes = + TypeName = "", + LastModifiedTS = "", + BusinessAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Classifications = {new AtlasClassification + Classifications = {new AtlasClassification { Attributes = { @@ -3923,17 +3890,17 @@ public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenien TimeZone = "", }}, }}, -CreateTime = 1234L, -CreatedBy = "", -CustomAttributes = + CreateTime = 1234L, + CreatedBy = "", + CustomAttributes = { ["key"] = "" }, -Guid = "", -HomeId = "", -IsIncomplete = true, -Labels = {""}, -Meanings = {new AtlasTermAssignmentHeader + Guid = "", + HomeId = "", + IsIncomplete = true, + Labels = { "" }, + Meanings = {new AtlasTermAssignmentHeader { Confidence = 1234, CreatedBy = "", @@ -3945,17 +3912,17 @@ public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenien Steward = "", TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), }}, -ProvenanceType = 1234, -Proxy = true, -RelationshipAttributes = + ProvenanceType = 1234, + Proxy = true, + RelationshipAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -Status = EntityStatus.Active, -UpdateTime = 1234L, -UpdatedBy = "", -Version = 1234L, -Contacts = + Status = EntityStatus.Active, + UpdateTime = 1234L, + UpdatedBy = "", + Version = 1234L, + Contacts = { ["key"] = {new ContactInfo { @@ -3963,11 +3930,8 @@ public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenien Info = "", }} }, -} -}, - Entity = default, - }; - Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo, attribute: ""); + } + }, entity: entity, attribute: ""); } [Test] @@ -4668,8 +4632,7 @@ public void Example_Entity_BatchSetClassifications_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); - Response> response = client.BatchSetClassifications(atlasEntityHeaders); + Response> response = client.BatchSetClassifications(); } [Test] @@ -4680,8 +4643,7 @@ public async Task Example_Entity_BatchSetClassifications_ShortVersion_Convenienc TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); - Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); + Response> response = await client.BatchSetClassificationsAsync(); } [Test] @@ -4860,20 +4822,18 @@ public void Example_Entity_BatchSetClassifications_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders + Response> response = client.BatchSetClassifications(guidHeaderMap: new Dictionary { - GuidHeaderMap = -{ -["key"] = new AtlasEntityHeader -{ -Attributes = + ["key"] = new AtlasEntityHeader + { + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -TypeName = "", -LastModifiedTS = "", -ClassificationNames = {""}, -Classifications = {new AtlasClassification + TypeName = "", + LastModifiedTS = "", + ClassificationNames = { "" }, + Classifications = {new AtlasClassification { Attributes = { @@ -4891,12 +4851,12 @@ public void Example_Entity_BatchSetClassifications_AllParameters_Convenience() TimeZone = "", }}, }}, -DisplayText = "", -Guid = "", -IsIncomplete = true, -Labels = {""}, -MeaningNames = {""}, -Meanings = {new AtlasTermAssignmentHeader + DisplayText = "", + Guid = "", + IsIncomplete = true, + Labels = { "" }, + MeaningNames = { "" }, + Meanings = {new AtlasTermAssignmentHeader { Confidence = 1234, CreatedBy = "", @@ -4908,11 +4868,9 @@ public void Example_Entity_BatchSetClassifications_AllParameters_Convenience() Steward = "", TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), }}, -Status = EntityStatus.Active, -} -}, - }; - Response> response = client.BatchSetClassifications(atlasEntityHeaders); + Status = EntityStatus.Active, + } + }); } [Test] @@ -4923,20 +4881,18 @@ public async Task Example_Entity_BatchSetClassifications_AllParameters_Convenien TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders + Response> response = await client.BatchSetClassificationsAsync(guidHeaderMap: new Dictionary { - GuidHeaderMap = -{ -["key"] = new AtlasEntityHeader -{ -Attributes = + ["key"] = new AtlasEntityHeader + { + Attributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -TypeName = "", -LastModifiedTS = "", -ClassificationNames = {""}, -Classifications = {new AtlasClassification + TypeName = "", + LastModifiedTS = "", + ClassificationNames = { "" }, + Classifications = {new AtlasClassification { Attributes = { @@ -4954,12 +4910,12 @@ public async Task Example_Entity_BatchSetClassifications_AllParameters_Convenien TimeZone = "", }}, }}, -DisplayText = "", -Guid = "", -IsIncomplete = true, -Labels = {""}, -MeaningNames = {""}, -Meanings = {new AtlasTermAssignmentHeader + DisplayText = "", + Guid = "", + IsIncomplete = true, + Labels = { "" }, + MeaningNames = { "" }, + Meanings = {new AtlasTermAssignmentHeader { Confidence = 1234, CreatedBy = "", @@ -4971,11 +4927,9 @@ public async Task Example_Entity_BatchSetClassifications_AllParameters_Convenien Steward = "", TermGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), }}, -Status = EntityStatus.Active, -} -}, - }; - Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); + Status = EntityStatus.Active, + } + }); } [Test] @@ -6074,8 +6028,7 @@ public void Example_Entity_ImportBusinessMetadata_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); - Response response = client.ImportBusinessMetadata(businessMetadataOptions); + Response response = client.ImportBusinessMetadata((Stream)null); } [Test] @@ -6086,8 +6039,7 @@ public async Task Example_Entity_ImportBusinessMetadata_ShortVersion_Convenience TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); - Response response = await client.ImportBusinessMetadataAsync(businessMetadataOptions); + Response response = await client.ImportBusinessMetadataAsync(null); } [Test] @@ -6148,8 +6100,7 @@ public void Example_Entity_ImportBusinessMetadata_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); - Response response = client.ImportBusinessMetadata(businessMetadataOptions); + Response response = client.ImportBusinessMetadata((Stream)null); } [Test] @@ -6160,8 +6111,7 @@ public async Task Example_Entity_ImportBusinessMetadata_AllParameters_Convenienc TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); - Response response = await client.ImportBusinessMetadataAsync(businessMetadataOptions); + Response response = await client.ImportBusinessMetadataAsync(null); } [Test] @@ -6838,8 +6788,7 @@ public void Example_Entity_MoveEntitiesToCollection_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(); - Response response = client.MoveEntitiesToCollection("", moveEntitiesConfig); + Response response = client.MoveEntitiesToCollection(""); } [Test] @@ -6850,8 +6799,7 @@ public async Task Example_Entity_MoveEntitiesToCollection_ShortVersion_Convenien 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); + Response response = await client.MoveEntitiesToCollectionAsync(""); } [Test] @@ -7016,11 +6964,7 @@ public void Example_Entity_MoveEntitiesToCollection_AllParameters_Convenience() 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); + Response response = client.MoveEntitiesToCollection("", entityGuids: new string[] { "" }); } [Test] @@ -7031,11 +6975,7 @@ public async Task Example_Entity_MoveEntitiesToCollection_AllParameters_Convenie 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); + Response response = await client.MoveEntitiesToCollectionAsync("", entityGuids: new string[] { "" }); } } } 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 index 84afdfc0ef0f3..f133ff8a94b3f 100644 --- 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 @@ -219,8 +219,7 @@ public void Example_Glossary_Create_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary(); - Response response = client.Create(atlasGlossary); + Response response = client.Create(); } [Test] @@ -231,8 +230,7 @@ public async Task Example_Glossary_Create_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary(); - Response response = await client.CreateAsync(atlasGlossary); + Response response = await client.CreateAsync(); } [Test] @@ -461,10 +459,9 @@ public void Example_Glossary_Create_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary + Response response = client.Create(guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification +new AtlasClassification { Attributes = { @@ -481,26 +478,20 @@ public void Example_Glossary_Create_AllParameters_Convenience() StartTime = "", TimeZone = "", }}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", categories: new AtlasRelatedCategoryHeader[] + { +new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", -}}, - Language = "", - Terms = {new AtlasRelatedTermHeader +} + }, language: "", terms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -509,10 +500,8 @@ public void Example_Glossary_Create_AllParameters_Convenience() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - Usage = "", - }; - Response response = client.Create(atlasGlossary); +} + }, usage: ""); } [Test] @@ -523,10 +512,9 @@ public async Task Example_Glossary_Create_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary + Response response = await client.CreateAsync(guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification +new AtlasClassification { Attributes = { @@ -543,26 +531,20 @@ public async Task Example_Glossary_Create_AllParameters_Convenience_Async() StartTime = "", TimeZone = "", }}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", categories: new AtlasRelatedCategoryHeader[] + { +new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", -}}, - Language = "", - Terms = {new AtlasRelatedTermHeader +} + }, language: "", terms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -571,10 +553,8 @@ public async Task Example_Glossary_Create_AllParameters_Convenience_Async() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - Usage = "", - }; - Response response = await client.CreateAsync(atlasGlossary); +} + }, usage: ""); } [Test] @@ -1061,8 +1041,7 @@ public void Example_Glossary_CreateCategory_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); - Response response = client.CreateCategory(atlasGlossaryCategory); + Response response = client.CreateCategory(); } [Test] @@ -1073,8 +1052,7 @@ public async Task Example_Glossary_CreateCategory_ShortVersion_Convenience_Async TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); - Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); + Response response = await client.CreateCategoryAsync(); } [Test] @@ -1323,10 +1301,16 @@ public void Example_Glossary_CreateCategory_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + AtlasGlossaryHeader anchor = new AtlasGlossaryHeader { - Guid = "", - Classifications = {new AtlasClassification + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }; + AtlasRelatedCategoryHeader parentCategory = default; + Response response = client.CreateCategory(guid: "", classifications: new AtlasClassification[] + { +new AtlasClassification { Attributes = { @@ -1343,32 +1327,20 @@ public void Example_Glossary_CreateCategory_AllParameters_Convenience() StartTime = "", TimeZone = "", }}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", anchor: anchor, childrenCategories: new AtlasRelatedCategoryHeader[] + { +new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", -}}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader +} + }, parentCategory: parentCategory, terms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -1377,9 +1349,8 @@ public void Example_Glossary_CreateCategory_AllParameters_Convenience() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - }; - Response response = client.CreateCategory(atlasGlossaryCategory); +} + }); } [Test] @@ -1390,10 +1361,16 @@ public async Task Example_Glossary_CreateCategory_AllParameters_Convenience_Asyn TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + AtlasGlossaryHeader anchor = new AtlasGlossaryHeader { - Guid = "", - Classifications = {new AtlasClassification + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }; + AtlasRelatedCategoryHeader parentCategory = default; + Response response = await client.CreateCategoryAsync(guid: "", classifications: new AtlasClassification[] + { +new AtlasClassification { Attributes = { @@ -1410,32 +1387,20 @@ public async Task Example_Glossary_CreateCategory_AllParameters_Convenience_Asyn StartTime = "", TimeZone = "", }}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", anchor: anchor, childrenCategories: new AtlasRelatedCategoryHeader[] + { +new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", -}}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader +} + }, parentCategory: parentCategory, terms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -1444,9 +1409,8 @@ public async Task Example_Glossary_CreateCategory_AllParameters_Convenience_Asyn Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - }; - Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); +} + }); } [Test] @@ -1663,8 +1627,7 @@ public void Example_Glossary_UpdateCategory_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); - Response response = client.UpdateCategory("", atlasGlossaryCategory); + Response response = client.UpdateCategory(""); } [Test] @@ -1675,8 +1638,7 @@ public async Task Example_Glossary_UpdateCategory_ShortVersion_Convenience_Async TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); - Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); + Response response = await client.UpdateCategoryAsync(""); } [Test] @@ -1925,10 +1887,16 @@ public void Example_Glossary_UpdateCategory_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + AtlasGlossaryHeader anchor = new AtlasGlossaryHeader { - Guid = "", - Classifications = {new AtlasClassification + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }; + AtlasRelatedCategoryHeader parentCategory = default; + Response response = client.UpdateCategory("", guid: "", classifications: new AtlasClassification[] + { +new AtlasClassification { Attributes = { @@ -1945,32 +1913,20 @@ public void Example_Glossary_UpdateCategory_AllParameters_Convenience() StartTime = "", TimeZone = "", }}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", anchor: anchor, childrenCategories: new AtlasRelatedCategoryHeader[] + { +new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", -}}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader +} + }, parentCategory: parentCategory, terms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -1979,9 +1935,8 @@ public void Example_Glossary_UpdateCategory_AllParameters_Convenience() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - }; - Response response = client.UpdateCategory("", atlasGlossaryCategory); +} + }); } [Test] @@ -1992,10 +1947,16 @@ public async Task Example_Glossary_UpdateCategory_AllParameters_Convenience_Asyn TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + AtlasGlossaryHeader anchor = new AtlasGlossaryHeader { - Guid = "", - Classifications = {new AtlasClassification + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }; + AtlasRelatedCategoryHeader parentCategory = default; + Response response = await client.UpdateCategoryAsync("", guid: "", classifications: new AtlasClassification[] + { +new AtlasClassification { Attributes = { @@ -2012,32 +1973,20 @@ public async Task Example_Glossary_UpdateCategory_AllParameters_Convenience_Asyn StartTime = "", TimeZone = "", }}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Anchor = new AtlasGlossaryHeader - { - DisplayText = "", - GlossaryGuid = "", - RelationGuid = "", - }, - ChildrenCategories = {new AtlasRelatedCategoryHeader +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", anchor: anchor, childrenCategories: new AtlasRelatedCategoryHeader[] + { +new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", -}}, - ParentCategory = default, - Terms = {new AtlasRelatedTermHeader +} + }, parentCategory: parentCategory, terms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -2046,9 +1995,8 @@ public async Task Example_Glossary_UpdateCategory_AllParameters_Convenience_Asyn Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - }; - Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); +} + }); } [Test] @@ -2565,8 +2513,7 @@ public void Example_Glossary_CreateTerm_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); - Response response = client.CreateTerm(atlasGlossaryTerm); + Response response = client.CreateTerm(); } [Test] @@ -2577,8 +2524,7 @@ public async Task Example_Glossary_CreateTerm_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); - Response response = await client.CreateTermAsync(atlasGlossaryTerm); + Response response = await client.CreateTermAsync(); } [Test] @@ -3309,10 +3255,15 @@ public void Example_Glossary_CreateTerm_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + AtlasGlossaryHeader anchor = new AtlasGlossaryHeader + { + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }; + Response response = client.CreateTerm(guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification +new AtlasClassification { Attributes = { @@ -3329,25 +3280,13 @@ public void Example_Glossary_CreateTerm_AllParameters_Convenience() 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 +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", abbreviation: "", templateName: new BinaryData[] + { +BinaryData.FromObjectAsJson(new object()) + }, anchor: anchor, antonyms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -3356,10 +3295,10 @@ public void Example_Glossary_CreateTerm_AllParameters_Convenience() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId +} + }, status: TermStatus.Draft, nickName: "", hierarchyInfo: new PurviewObjectId[] + { +new PurviewObjectId { Guid = "", TypeName = "", @@ -3375,28 +3314,33 @@ public void Example_Glossary_CreateTerm_AllParameters_Convenience() { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -}}, - Resources = {new ResourceLink +} + }, resources: new ResourceLink[] + { +new ResourceLink { DisplayName = "", Url = "", -}}, - Contacts = -{ -["key"] = {new ContactInfo +} + }, contacts: new Dictionary> + { + ["key"] = new ContactInfo[] + { +new ContactInfo { Id = "", Info = "", -}} -}, - Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) } -}, - AssignedEntities = {new AtlasRelatedObjectId + } + }, attributes: new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, assignedEntities: new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId { Guid = "", TypeName = "", @@ -3418,31 +3362,54 @@ public void Example_Glossary_CreateTerm_AllParameters_Convenience() }, RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), RelationshipStatus = StatusAtlasRelationship.Active, -}}, - Categories = {new AtlasTermCategorizationHeader +} + }, categories: new AtlasTermCategorizationHeader[] + { +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); +} + }, classifies: new AtlasRelatedTermHeader[] + { +default + }, examples: new string[] { "" }, isA: new AtlasRelatedTermHeader[] + { +default + }, preferredTerms: new AtlasRelatedTermHeader[] + { +default + }, preferredToTerms: new AtlasRelatedTermHeader[] + { +default + }, replacedBy: new AtlasRelatedTermHeader[] + { +default + }, replacementTerms: new AtlasRelatedTermHeader[] + { +default + }, seeAlso: new AtlasRelatedTermHeader[] + { +default + }, synonyms: new AtlasRelatedTermHeader[] + { +default + }, translatedTerms: new AtlasRelatedTermHeader[] + { +default + }, translationTerms: new AtlasRelatedTermHeader[] + { +default + }, usage: "", validValues: new AtlasRelatedTermHeader[] + { +default + }, validValuesFor: new AtlasRelatedTermHeader[] + { +default + }, includeTermHierarchy: true); } [Test] @@ -3453,10 +3420,15 @@ public async Task Example_Glossary_CreateTerm_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + AtlasGlossaryHeader anchor = new AtlasGlossaryHeader { - Guid = "", - Classifications = {new AtlasClassification + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }; + Response response = await client.CreateTermAsync(guid: "", classifications: new AtlasClassification[] + { +new AtlasClassification { Attributes = { @@ -3473,25 +3445,13 @@ public async Task Example_Glossary_CreateTerm_AllParameters_Convenience_Async() 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 +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", abbreviation: "", templateName: new BinaryData[] + { +BinaryData.FromObjectAsJson(new object()) + }, anchor: anchor, antonyms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -3500,10 +3460,10 @@ public async Task Example_Glossary_CreateTerm_AllParameters_Convenience_Async() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId +} + }, status: TermStatus.Draft, nickName: "", hierarchyInfo: new PurviewObjectId[] + { +new PurviewObjectId { Guid = "", TypeName = "", @@ -3519,28 +3479,33 @@ public async Task Example_Glossary_CreateTerm_AllParameters_Convenience_Async() { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -}}, - Resources = {new ResourceLink +} + }, resources: new ResourceLink[] + { +new ResourceLink { DisplayName = "", Url = "", -}}, - Contacts = -{ -["key"] = {new ContactInfo +} + }, contacts: new Dictionary> + { + ["key"] = new ContactInfo[] + { +new ContactInfo { Id = "", Info = "", -}} -}, - Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) } -}, - AssignedEntities = {new AtlasRelatedObjectId + } + }, attributes: new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, assignedEntities: new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId { Guid = "", TypeName = "", @@ -3562,31 +3527,54 @@ public async Task Example_Glossary_CreateTerm_AllParameters_Convenience_Async() }, RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), RelationshipStatus = StatusAtlasRelationship.Active, -}}, - Categories = {new AtlasTermCategorizationHeader +} + }, categories: new AtlasTermCategorizationHeader[] + { +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); +} + }, classifies: new AtlasRelatedTermHeader[] + { +default + }, examples: new string[] { "" }, isA: new AtlasRelatedTermHeader[] + { +default + }, preferredTerms: new AtlasRelatedTermHeader[] + { +default + }, preferredToTerms: new AtlasRelatedTermHeader[] + { +default + }, replacedBy: new AtlasRelatedTermHeader[] + { +default + }, replacementTerms: new AtlasRelatedTermHeader[] + { +default + }, seeAlso: new AtlasRelatedTermHeader[] + { +default + }, synonyms: new AtlasRelatedTermHeader[] + { +default + }, translatedTerms: new AtlasRelatedTermHeader[] + { +default + }, translationTerms: new AtlasRelatedTermHeader[] + { +default + }, usage: "", validValues: new AtlasRelatedTermHeader[] + { +default + }, validValuesFor: new AtlasRelatedTermHeader[] + { +default + }, includeTermHierarchy: true); } [Test] @@ -4021,8 +4009,7 @@ public void Example_Glossary_UpdateTerm_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); - Response response = client.UpdateTerm("", atlasGlossaryTerm); + Response response = client.UpdateTerm(""); } [Test] @@ -4033,8 +4020,7 @@ public async Task Example_Glossary_UpdateTerm_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); - Response response = await client.UpdateTermAsync("", atlasGlossaryTerm); + Response response = await client.UpdateTermAsync(""); } [Test] @@ -4765,10 +4751,15 @@ public void Example_Glossary_UpdateTerm_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + AtlasGlossaryHeader anchor = new AtlasGlossaryHeader { - Guid = "", - Classifications = {new AtlasClassification + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }; + Response response = client.UpdateTerm("", guid: "", classifications: new AtlasClassification[] + { +new AtlasClassification { Attributes = { @@ -4785,25 +4776,13 @@ public void Example_Glossary_UpdateTerm_AllParameters_Convenience() 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 +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", abbreviation: "", templateName: new BinaryData[] + { +BinaryData.FromObjectAsJson(new object()) + }, anchor: anchor, antonyms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -4812,10 +4791,10 @@ public void Example_Glossary_UpdateTerm_AllParameters_Convenience() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId +} + }, status: TermStatus.Draft, nickName: "", hierarchyInfo: new PurviewObjectId[] + { +new PurviewObjectId { Guid = "", TypeName = "", @@ -4831,28 +4810,33 @@ public void Example_Glossary_UpdateTerm_AllParameters_Convenience() { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -}}, - Resources = {new ResourceLink +} + }, resources: new ResourceLink[] + { +new ResourceLink { DisplayName = "", Url = "", -}}, - Contacts = -{ -["key"] = {new ContactInfo +} + }, contacts: new Dictionary> + { + ["key"] = new ContactInfo[] + { +new ContactInfo { Id = "", Info = "", -}} -}, - Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) } -}, - AssignedEntities = {new AtlasRelatedObjectId + } + }, attributes: new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, assignedEntities: new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId { Guid = "", TypeName = "", @@ -4874,31 +4858,54 @@ public void Example_Glossary_UpdateTerm_AllParameters_Convenience() }, RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), RelationshipStatus = StatusAtlasRelationship.Active, -}}, - Categories = {new AtlasTermCategorizationHeader +} + }, categories: new AtlasTermCategorizationHeader[] + { +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); +} + }, classifies: new AtlasRelatedTermHeader[] + { +default + }, examples: new string[] { "" }, isA: new AtlasRelatedTermHeader[] + { +default + }, preferredTerms: new AtlasRelatedTermHeader[] + { +default + }, preferredToTerms: new AtlasRelatedTermHeader[] + { +default + }, replacedBy: new AtlasRelatedTermHeader[] + { +default + }, replacementTerms: new AtlasRelatedTermHeader[] + { +default + }, seeAlso: new AtlasRelatedTermHeader[] + { +default + }, synonyms: new AtlasRelatedTermHeader[] + { +default + }, translatedTerms: new AtlasRelatedTermHeader[] + { +default + }, translationTerms: new AtlasRelatedTermHeader[] + { +default + }, usage: "", validValues: new AtlasRelatedTermHeader[] + { +default + }, validValuesFor: new AtlasRelatedTermHeader[] + { +default + }, includeTermHierarchy: true); } [Test] @@ -4909,10 +4916,15 @@ public async Task Example_Glossary_UpdateTerm_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + AtlasGlossaryHeader anchor = new AtlasGlossaryHeader { - Guid = "", - Classifications = {new AtlasClassification + DisplayText = "", + GlossaryGuid = "", + RelationGuid = "", + }; + Response response = await client.UpdateTermAsync("", guid: "", classifications: new AtlasClassification[] + { +new AtlasClassification { Attributes = { @@ -4929,25 +4941,13 @@ public async Task Example_Glossary_UpdateTerm_AllParameters_Convenience_Async() 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 +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", abbreviation: "", templateName: new BinaryData[] + { +BinaryData.FromObjectAsJson(new object()) + }, anchor: anchor, antonyms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -4956,10 +4956,10 @@ public async Task Example_Glossary_UpdateTerm_AllParameters_Convenience_Async() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - Status = TermStatus.Draft, - NickName = "", - HierarchyInfo = {new PurviewObjectId +} + }, status: TermStatus.Draft, nickName: "", hierarchyInfo: new PurviewObjectId[] + { +new PurviewObjectId { Guid = "", TypeName = "", @@ -4975,28 +4975,33 @@ public async Task Example_Glossary_UpdateTerm_AllParameters_Convenience_Async() { ["key"] = BinaryData.FromObjectAsJson(new object()) }, -}}, - Resources = {new ResourceLink +} + }, resources: new ResourceLink[] + { +new ResourceLink { DisplayName = "", Url = "", -}}, - Contacts = -{ -["key"] = {new ContactInfo +} + }, contacts: new Dictionary> + { + ["key"] = new ContactInfo[] + { +new ContactInfo { Id = "", Info = "", -}} -}, - Attributes = -{ -["key"] = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) } -}, - AssignedEntities = {new AtlasRelatedObjectId + } + }, attributes: new Dictionary> + { + ["key"] = new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + } + }, assignedEntities: new AtlasRelatedObjectId[] + { +new AtlasRelatedObjectId { Guid = "", TypeName = "", @@ -5018,31 +5023,54 @@ public async Task Example_Glossary_UpdateTerm_AllParameters_Convenience_Async() }, RelationshipGuid = Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), RelationshipStatus = StatusAtlasRelationship.Active, -}}, - Categories = {new AtlasTermCategorizationHeader +} + }, categories: new AtlasTermCategorizationHeader[] + { +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); +} + }, classifies: new AtlasRelatedTermHeader[] + { +default + }, examples: new string[] { "" }, isA: new AtlasRelatedTermHeader[] + { +default + }, preferredTerms: new AtlasRelatedTermHeader[] + { +default + }, preferredToTerms: new AtlasRelatedTermHeader[] + { +default + }, replacedBy: new AtlasRelatedTermHeader[] + { +default + }, replacementTerms: new AtlasRelatedTermHeader[] + { +default + }, seeAlso: new AtlasRelatedTermHeader[] + { +default + }, synonyms: new AtlasRelatedTermHeader[] + { +default + }, translatedTerms: new AtlasRelatedTermHeader[] + { +default + }, translationTerms: new AtlasRelatedTermHeader[] + { +default + }, usage: "", validValues: new AtlasRelatedTermHeader[] + { +default + }, validValuesFor: new AtlasRelatedTermHeader[] + { +default + }, includeTermHierarchy: true); } [Test] @@ -7459,8 +7487,7 @@ public void Example_Glossary_Update_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary(); - Response response = client.Update("", atlasGlossary); + Response response = client.Update(""); } [Test] @@ -7471,8 +7498,7 @@ public async Task Example_Glossary_Update_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary(); - Response response = await client.UpdateAsync("", atlasGlossary); + Response response = await client.UpdateAsync(""); } [Test] @@ -7701,10 +7727,9 @@ public void Example_Glossary_Update_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossary atlasGlossary = new AtlasGlossary + Response response = client.Update("", guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification +new AtlasClassification { Attributes = { @@ -7721,26 +7746,20 @@ public void Example_Glossary_Update_AllParameters_Convenience() StartTime = "", TimeZone = "", }}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", categories: new AtlasRelatedCategoryHeader[] + { +new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", -}}, - Language = "", - Terms = {new AtlasRelatedTermHeader +} + }, language: "", terms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -7749,10 +7768,8 @@ public void Example_Glossary_Update_AllParameters_Convenience() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - Usage = "", - }; - Response response = client.Update("", atlasGlossary, ignoreTermsAndCategories: true); +} + }, usage: "", ignoreTermsAndCategories: true); } [Test] @@ -7763,10 +7780,9 @@ public async Task Example_Glossary_Update_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossary atlasGlossary = new AtlasGlossary + Response response = await client.UpdateAsync("", guid: "", classifications: new AtlasClassification[] { - Guid = "", - Classifications = {new AtlasClassification +new AtlasClassification { Attributes = { @@ -7783,26 +7799,20 @@ public async Task Example_Glossary_Update_AllParameters_Convenience_Async() StartTime = "", TimeZone = "", }}, -}}, - LongDescription = "", - Name = "", - QualifiedName = "", - ShortDescription = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - UpdateTime = 1234L, - UpdatedBy = "", - Categories = {new AtlasRelatedCategoryHeader +} + }, longDescription: "", name: "", qualifiedName: "", shortDescription: "", lastModifiedTS: "", createTime: 1234L, createdBy: "", updateTime: 1234L, updatedBy: "", categories: new AtlasRelatedCategoryHeader[] + { +new AtlasRelatedCategoryHeader { CategoryGuid = "", Description = "", DisplayText = "", ParentCategoryGuid = "", RelationGuid = "", -}}, - Language = "", - Terms = {new AtlasRelatedTermHeader +} + }, language: "", terms: new AtlasRelatedTermHeader[] + { +new AtlasRelatedTermHeader { Description = "", DisplayText = "", @@ -7811,10 +7821,8 @@ public async Task Example_Glossary_Update_AllParameters_Convenience_Async() Status = AtlasTermRelationshipStatus.Draft, Steward = "", TermGuid = "", -}}, - Usage = "", - }; - Response response = await client.UpdateAsync("", atlasGlossary, ignoreTermsAndCategories: true); +} + }, usage: "", ignoreTermsAndCategories: true); } [Test] 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 index 8713ced02df62..932523e939153 100644 --- 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 @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure.Core; @@ -54,8 +55,7 @@ public void Example_Relationship_Create_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship(); - Response response = client.Create(atlasRelationship); + Response response = client.Create(); } [Test] @@ -66,8 +66,7 @@ public async Task Example_Relationship_Create_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship(); - Response response = await client.CreateAsync(atlasRelationship); + Response response = await client.CreateAsync(); } [Test] @@ -198,36 +197,20 @@ public void Example_Relationship_Create_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship + AtlasObjectId end1 = new AtlasObjectId { - Attributes = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, + Guid = "", TypeName = "", - LastModifiedTS = "", - CreateTime = 1234L, - CreatedBy = "", - End1 = new AtlasObjectId - { - Guid = "", - TypeName = "", - UniqueAttributes = + UniqueAttributes = { ["key"] = BinaryData.FromObjectAsJson(new object()) }, - }, - End2 = default, - Guid = "", - HomeId = "", - Label = "